From d204c135b9934305b953c61b458bc45fe30f82a7 Mon Sep 17 00:00:00 2001 From: libccy Date: Sat, 13 Aug 2016 23:57:31 +0800 Subject: [PATCH] c --- game/game.js | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/game/game.js b/game/game.js index 13a9a1a7d..bc0927e88 100755 --- a/game/game.js +++ b/game/game.js @@ -3157,6 +3157,7 @@ lib.status.canvas=false; return false; } + _status.canvasChanged=true; ui.canvas.width=ui.arena.offsetWidth; ui.canvas.height=ui.arena.offsetHeight; var ctx=ui.ctx; @@ -18278,8 +18279,11 @@ ui.touchlines.shift().delete(); } } - ui.canvas.width=ui.arena.offsetWidth; - ui.canvas.height=ui.arena.offsetHeight; + if(_status.canvasChanged){ + ui.canvas.width=ui.arena.offsetWidth; + ui.canvas.height=ui.arena.offsetHeight; + delete _status.canvasChanged; + } for(var i=0;i