This commit is contained in:
parent
6efa500759
commit
c5e64ef1a0
20
game/game.js
20
game/game.js
|
@ -3186,19 +3186,9 @@
|
|||
}
|
||||
else if(ua.indexOf('iphone')!=-1||ua.indexOf('ipad')!=-1){
|
||||
lib.device='ios';
|
||||
var ua=navigator.userAgent.toLowerCase();
|
||||
if(ua.indexOf('ipad')!=-1){
|
||||
window.isIpad=true;
|
||||
}
|
||||
else{
|
||||
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=0.6, maximum-scale=0.6, minimum-scale=0.6, width=device-width, height=device-height";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
lib.assetURL=noname_inited;
|
||||
}
|
||||
|
@ -3343,10 +3333,12 @@
|
|||
game.saveConfig('touchscreen',true);
|
||||
game.saveConfig('confirmtouch',true);
|
||||
game.saveConfig('low_performance',true);
|
||||
game.saveConfig('layout','phone');
|
||||
game.saveConfig('confirm_exit',true);
|
||||
if(!window.isIpad){
|
||||
game.saveConfig('layout','phone');
|
||||
}
|
||||
}
|
||||
if(lib.device=='android'&&lib.config.layout=='phone'&&window.devicePixelRatio>1&&document.documentElement.offsetWidth<960){
|
||||
if(lib.device&&window.devicePixelRatio>1&&document.documentElement.offsetWidth<960){
|
||||
game.documentZoom=document.documentElement.offsetWidth/960;
|
||||
game.deviceZoom=game.documentZoom;
|
||||
document.documentElement.style.zoom=game.documentZoom;
|
||||
|
@ -18780,6 +18772,10 @@
|
|||
node.style.top=e.y+'px';
|
||||
}
|
||||
popupContainer.appendChild(node);
|
||||
var rect=node.getBoundingClientRect();
|
||||
if(lib.config.layout=='phone'&&rect.top*1.3+rect.height*1.3+20>ui.window.offsetHeight){
|
||||
node.style.top=(ui.window.offsetHeight-20-rect.height*1.3)/1.3+'px';
|
||||
}
|
||||
popupContainer.classList.remove('hidden');
|
||||
popupContainer.onclose=onclose;
|
||||
};
|
||||
|
|
|
@ -11,6 +11,7 @@ window.noname_update={
|
|||
'mode/connect.js',
|
||||
'extension/coin/extension.js',
|
||||
'layout/phone/layout.css',
|
||||
'layout/default/menu.css',
|
||||
],
|
||||
'1.8.17':[],
|
||||
'1.8.17.1':[],
|
||||
|
|
|
@ -273,6 +273,7 @@
|
|||
position:absolute;
|
||||
overflow:scroll;
|
||||
max-height: 400px;
|
||||
transition-property: opacity;
|
||||
}
|
||||
.popup-container>.menu>div{
|
||||
padding-top:5px;
|
||||
|
|
Loading…
Reference in New Issue