This commit is contained in:
libccy 2016-08-13 23:57:31 +08:00
parent 6a88a72b02
commit d204c135b9
1 changed files with 11 additions and 6 deletions

View File

@ -3157,6 +3157,7 @@
lib.status.canvas=false; lib.status.canvas=false;
return false; return false;
} }
_status.canvasChanged=true;
ui.canvas.width=ui.arena.offsetWidth; ui.canvas.width=ui.arena.offsetWidth;
ui.canvas.height=ui.arena.offsetHeight; ui.canvas.height=ui.arena.offsetHeight;
var ctx=ui.ctx; var ctx=ui.ctx;
@ -18278,8 +18279,11 @@
ui.touchlines.shift().delete(); ui.touchlines.shift().delete();
} }
} }
if(_status.canvasChanged){
ui.canvas.width=ui.arena.offsetWidth; ui.canvas.width=ui.arena.offsetWidth;
ui.canvas.height=ui.arena.offsetHeight; ui.canvas.height=ui.arena.offsetHeight;
delete _status.canvasChanged;
}
for(var i=0;i<game.players.length;i++){ for(var i=0;i<game.players.length;i++){
game.players[i].unprompt(); game.players[i].unprompt();
} }
@ -28099,8 +28103,11 @@
while(ui.touchlines.length){ while(ui.touchlines.length){
ui.touchlines.shift().delete(); ui.touchlines.shift().delete();
} }
if(_status.canvasChanged){
ui.canvas.width=ui.arena.offsetWidth; ui.canvas.width=ui.arena.offsetWidth;
ui.canvas.height=ui.arena.offsetHeight; ui.canvas.height=ui.arena.offsetHeight;
delete _status.canvasChanged;
}
if(tmpflag){ if(tmpflag){
game.check(); game.check();
} }
@ -28537,8 +28544,6 @@
_status.clicked=false; _status.clicked=false;
game.uncheck(); game.uncheck();
game.check(); game.check();
ui.canvas.width=ui.arena.offsetWidth;
ui.canvas.height=ui.arena.offsetHeight;
_status.clicked=true; _status.clicked=true;
} }
} }