From 924122a0ee12581eb75f0a46c0ef7592c80744e6 Mon Sep 17 00:00:00 2001 From: libccy Date: Tue, 28 Nov 2017 12:44:38 +0800 Subject: [PATCH] rightbar --- game/game.js | 31 +++++++++++++++++++++++++++++++ theme/simple/style.css | 4 ++-- 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/game/game.js b/game/game.js index 3b1125d3f..4b68e5de4 100644 --- a/game/game.js +++ b/game/game.js @@ -18393,6 +18393,13 @@ dx=this.offsetLeft+this.offsetWidth/2-52-node.offsetLeft; dy=this.offsetTop+this.offsetHeight/2-52-node.offsetTop; + + if(get.is.mobileMe(this)){ + dx+=get.cardOffset(); + if(ui.arena.classList.contains('oblongcard')){ + dy-=16; + } + } } node.style.transitionDuration='0.8s'; ui.refresh(node); @@ -18796,6 +18803,12 @@ else{ dx=this.offsetLeft+this.offsetWidth/2-52-nx; dy=this.offsetTop+this.offsetHeight/2-52-ny; + if(get.is.mobileMe(this)){ + dx+=get.cardOffset(); + if(ui.arena.classList.contains('oblongcard')){ + dy-=16; + } + } } if(node.style.transform&&node.style.transform!='none'&&node.style.transform.indexOf('translate')==-1){ node.style.transform+=' translate('+dx+'px,'+dy+'px)'; @@ -18834,6 +18847,12 @@ else{ dx=this.offsetLeft+this.offsetWidth/2-52-nx; dy=this.offsetTop+this.offsetHeight/2-52-ny; + if(get.is.mobileMe(this)){ + dx+=get.cardOffset(); + if(ui.arena.classList.contains('oblongcard')){ + dy-=16; + } + } } if(node.style.transform&&node.style.transform!='none'&&node.style.transform.indexOf('translate')==-1){ node.style.transform+=' translate('+dx+'px,'+dy+'px)'; @@ -20106,6 +20125,13 @@ dx=player.offsetLeft+player.offsetWidth/2-52-this.offsetLeft; dy=player.offsetTop+player.offsetHeight/2-52-this.offsetTop; } + if(get.is.mobileMe(player)){ + dx+=get.cardOffset(); + if(ui.arena.classList.contains('oblongcard')){ + dy-=16; + } + } + if(this.style.transform&&this.style.transform!='none'&&this.style.transform.indexOf('translate')==-1){ this.style.transform+=' translate('+dx+'px,'+dy+'px)'; @@ -42748,6 +42774,11 @@ } return list; }, + cardOffset:function(){ + var x=ui.arena.getBoundingClientRect(); + var y=ui.window.getBoundingClientRect(); + return -y.width/2+(x.left+x.width/2); + }, colorspan:function(str){ if(str[0]=='#'){ var color; diff --git a/theme/simple/style.css b/theme/simple/style.css index fc111946e..157572bda 100644 --- a/theme/simple/style.css +++ b/theme/simple/style.css @@ -122,11 +122,11 @@ body{ .card:empty,.card.infohidden{ background: url('../style/cardback/image/official.png'); - background-size: cover; + background-size: 100% 100%; } .card.infohidden:not(.infoflip){ background: url('../style/cardback/image/official2.png'); - background-size: cover; + background-size: 100% 100%; } #system>div>.glow {