Commit dff26fd1 authored by 李维's avatar 李维

bug fix

parent 27d276db
...@@ -354,7 +354,7 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -354,7 +354,7 @@ export class PlayComponent implements OnInit, OnDestroy {
// 卡片容器(盘子 桌布) // 卡片容器(盘子 桌布)
initCardContainer(){ initCardContainer(){
let pos = { let pos = {
image:"",x:0, y:0, sx:0, sy:0 image:"",x:0, y:0, sx:0, sy:0, height:0
} }
switch(this.g_formData.cardContainerSetting.type){ switch(this.g_formData.cardContainerSetting.type){
case "A": case "A":
...@@ -362,7 +362,8 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -362,7 +362,8 @@ export class PlayComponent implements OnInit, OnDestroy {
pos.x = this.g_canvasWidth/2; pos.x = this.g_canvasWidth/2;
pos.y = 660*this.g_mapScale; pos.y = 660*this.g_mapScale;
pos.sx = 658*this.g_mapScale; pos.sx = 658*this.g_mapScale;
pos.sy = 228*this.g_mapScale; pos.sy = 185*this.g_mapScale;
pos.height = 92.5;
break; break;
case "B": case "B":
pos.image = "box"; pos.image = "box";
...@@ -370,6 +371,7 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -370,6 +371,7 @@ export class PlayComponent implements OnInit, OnDestroy {
pos.y = 720*this.g_mapScale; pos.y = 720*this.g_mapScale;
pos.sx = 771*this.g_mapScale*0.8; pos.sx = 771*this.g_mapScale*0.8;
pos.sy = 282*this.g_mapScale*0.8; pos.sy = 282*this.g_mapScale*0.8;
pos.height = 141;
break; break;
case "C": case "C":
pos.image = "tablecloth"; pos.image = "tablecloth";
...@@ -377,13 +379,15 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -377,13 +379,15 @@ export class PlayComponent implements OnInit, OnDestroy {
pos.y = 718*this.g_mapScale; pos.y = 718*this.g_mapScale;
pos.sx = 918*this.g_mapScale; pos.sx = 918*this.g_mapScale;
pos.sy = 228*this.g_mapScale; pos.sy = 228*this.g_mapScale;
pos.height = 114;
break; break;
default: default:
pos.image = this.g_formData.cardContainerSetting.image_url; pos.image = this.g_formData.cardContainerSetting.image_url;
pos.x = this.g_canvasWidth/2; pos.x = this.g_canvasWidth/2;
pos.y = 820*this.g_mapScale; pos.y = 660*this.g_mapScale;
pos.sx = 658*this.g_mapScale; pos.sx = 658*this.g_mapScale;
pos.sy = 228*this.g_mapScale; pos.sy = 185*this.g_mapScale;
pos.height = 92.5;
break; break;
} }
let element = this.g_cartoon.createCartoonElementImageFunc('card-container', pos.image, (w,h)=>{ let element = this.g_cartoon.createCartoonElementImageFunc('card-container', pos.image, (w,h)=>{
...@@ -394,7 +398,7 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -394,7 +398,7 @@ export class PlayComponent implements OnInit, OnDestroy {
}, (w,h)=>{ }, (w,h)=>{
return { return {
x: pos.x, x: pos.x,
y: this.g_cartoon.getOrigin().y - (h/2)*this.g_mapScale + pos.y y: this.g_cartoon.getOrigin().y - pos.height*this.g_mapScale + pos.y
} }
}) })
this.render(element.ref) this.render(element.ref)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment