diff --git a/game/game.js b/game/game.js index b3d91497c..d884aaa71 100755 --- a/game/game.js +++ b/game/game.js @@ -4259,16 +4259,46 @@ if(list.length) this.$draw(list); }, $fire:function(){ - game.animate.flame(this.offsetLeft+this.offsetWidth/2, - this.offsetTop+this.offsetHeight-20,700,'fire'); + var left,top; + if(lib.config.mode=='chess'){ + var rect=this.getBoundingClientRect(); + left=rect.left; + top=rect.top; + } + else{ + left=this.offsetLeft; + top=this.offsetTop; + } + game.animate.flame(left+this.offsetWidth/2, + top+this.offsetHeight-20,700,'fire'); }, $thunder:function(){ - game.animate.flame(this.offsetLeft+this.offsetWidth/2, - this.offsetTop+this.offsetHeight-30,700,'thunder'); + var left,top; + if(lib.config.mode=='chess'){ + var rect=this.getBoundingClientRect(); + left=rect.left; + top=rect.top; + } + else{ + left=this.offsetLeft; + top=this.offsetTop; + } + game.animate.flame(left+this.offsetWidth/2, + top+this.offsetHeight-30,700,'thunder'); }, $recover:function(){ - game.animate.flame(this.offsetLeft+this.offsetWidth/2, - this.offsetTop+this.offsetHeight-30,700,'recover'); + var left,top; + if(lib.config.mode=='chess'){ + var rect=this.getBoundingClientRect(); + left=rect.left; + top=rect.top; + } + else{ + left=this.offsetLeft; + top=this.offsetTop; + } + game.animate.flame(left+this.offsetWidth/2, + top+this.offsetHeight-30,700,'recover'); }, $damagepop:function(num,nature){ if(typeof num=='number'){ diff --git a/layout/default/layout.css b/layout/default/layout.css index 45cc19c92..53bf93b80 100755 --- a/layout/default/layout.css +++ b/layout/default/layout.css @@ -217,6 +217,7 @@ margin-bottom: 5px; width: 100%; text-align: center; top:calc(50% - 36px); + left:0; opacity: 0; -webkit-transform:scale(0.7); } diff --git a/layout/mode/chess.css b/layout/mode/chess.css index 3f681abb4..1fccdc72b 100755 --- a/layout/mode/chess.css +++ b/layout/mode/chess.css @@ -28,6 +28,11 @@ #arena .card.thrown{ z-index:4; } +#canvas2{ + position: absolute; + z-index: 10; + pointer-events: none; +} #handcards1{ height:120px; diff --git a/mode/chess.js b/mode/chess.js index cbb087974..c81fd5442 100755 --- a/mode/chess.js +++ b/mode/chess.js @@ -624,6 +624,7 @@ mode.chess={ ui.chessContainer.style.WebkitOverflowScrolling='touch'; ui.chess=ui.create.div('#chess',ui.chessContainer); ui.canvas2=document.createElement('canvas'); + ui.canvas2.id='canvas2'; ui.chess.appendChild(ui.canvas2); ui.ctx2=ui.canvas2.getContext('2d'); game.me=ui.create.player();