From 9572591d513ce9f6cdd1a00ed1427da550336850 Mon Sep 17 00:00:00 2001 From: libccy Date: Thu, 9 Feb 2017 11:01:03 +0800 Subject: [PATCH] w --- game/game.js | 44 ++++++++++++++++++++++++++++---------------- 1 file changed, 28 insertions(+), 16 deletions(-) diff --git a/game/game.js b/game/game.js index 5ba4c1014..5725b2840 100644 --- a/game/game.js +++ b/game/game.js @@ -32374,18 +32374,33 @@ var length=0; var controls=[]; var widths=[]; - var add=function(node){ + var add=function(node,first){ var thiswidth=parseInt(node.style.width); if(thiswidth){ thiswidth+=8; length+=thiswidth; - widths.push(thiswidth); + if(first){ + widths.unshift(thiswidth); + } + else{ + widths.push(thiswidth); + } } else{ length+=node.offsetWidth; - widths.push(node.offsetWidth); + if(first){ + widths.unshift(node.offsetWidth); + } + else{ + widths.push(node.offsetWidth); + } + } + if(first){ + controls.unshift(node); + } + else{ + controls.push(node); } - controls.push(node); } var hasWuxie=false; for(var i=0;i=fullwidth){ - if(get.mode()=='stone'){ - ui.tempnowuxie._offset=ui.arena.offsetWidth/2-ui.tempnowuxie.offsetWidth-132; - } - else if(fullright){ - ui.tempnowuxie._offset=ui.arena.offsetWidth/2-ui.tempnowuxie.offsetWidth-8; + if(game.layout!='default'&&game.layout!='newlayout'&&ui.arena.offsetWidth/2>=fullwidth){ + if(fullright){ + ui.tempnowuxie._offset=-ui.arena.offsetWidth/2+135; } else{ - ui.tempnowuxie._offset=ui.arena.offsetWidth/2-ui.tempnowuxie.offsetWidth-162; + ui.tempnowuxie._offset=-ui.arena.offsetWidth/2+165; } ui.tempnowuxie.style.transform='translateX('+ui.tempnowuxie._offset+'px)'; } else{ - add(ui.tempnowuxie); + add(ui.tempnowuxie,true); } } if(!controls.length) return;