ios
This commit is contained in:
parent
0253b0d154
commit
10ea9313c5
|
@ -2045,7 +2045,10 @@ card.swd={
|
||||||
ai:{
|
ai:{
|
||||||
order:10,
|
order:10,
|
||||||
result:{
|
result:{
|
||||||
target:-1
|
target:function(player,target){
|
||||||
|
if(target.isMad()) return 0;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -515,7 +515,7 @@ character.shenhua={
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
if(player==_status.currentPhase) return false;
|
if(player==_status.currentPhase) return false;
|
||||||
for(var i=0;i<event.cards.length;i++){
|
for(var i=0;i<event.cards.length;i++){
|
||||||
if(event.cards[i].original!='j') return true;
|
if(event.cards[i].original&&event.cards[i].original!='j') return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
|
|
16
game/game.js
16
game/game.js
|
@ -3682,12 +3682,24 @@
|
||||||
if(navigator.userAgent.toLowerCase().indexOf('crosswalk')!=-1){
|
if(navigator.userAgent.toLowerCase().indexOf('crosswalk')!=-1){
|
||||||
lib.crosswalk=true;
|
lib.crosswalk=true;
|
||||||
}
|
}
|
||||||
if(lib.device&&window.devicePixelRatio>1&&document.documentElement.offsetWidth<900&&!lib.crosswalk){
|
if(lib.device=='android'&&window.devicePixelRatio>1&&document.documentElement.offsetWidth<900&&!lib.crosswalk){
|
||||||
game.documentZoom=document.documentElement.offsetWidth/960;
|
game.documentZoom=document.documentElement.offsetWidth/960;
|
||||||
game.deviceZoom=game.documentZoom;
|
game.deviceZoom=game.documentZoom;
|
||||||
document.documentElement.style.zoom=game.documentZoom;
|
document.documentElement.style.zoom=game.documentZoom;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
if(lib.device=='ios'){
|
||||||
|
if(document.documentElement.offsetWidth<900){
|
||||||
|
var zoom=Math.round(document.documentElement.offsetWidth/96)/10;
|
||||||
|
var metas=document.head.querySelectorAll('meta');
|
||||||
|
for(var j=0;j<metas.length;j++){
|
||||||
|
if(metas[j].name=='viewport'){
|
||||||
|
metas[j].content="user-scalable=no, initial-scale="+zoom+", maximum-scale="+zoom+", minimum-scale="+zoom+", width=device-width, height=device-height";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
game.documentZoom=1;
|
game.documentZoom=1;
|
||||||
game.deviceZoom=1;
|
game.deviceZoom=1;
|
||||||
}
|
}
|
||||||
|
@ -19424,7 +19436,7 @@
|
||||||
active._link.remove();
|
active._link.remove();
|
||||||
}
|
}
|
||||||
this.classList.add('active');
|
this.classList.add('active');
|
||||||
if((game.deviceZoom!=1||lib.crosswalk)&&lib.config.layout=='phone'){
|
if((game.deviceZoom!=1||lib.crosswalk||lib.device=='ios')&&lib.config.layout=='phone'){
|
||||||
menuTabBar.style.left=(this.offsetLeft/game.documentZoom)+'px';
|
menuTabBar.style.left=(this.offsetLeft/game.documentZoom)+'px';
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
|
Loading…
Reference in New Issue