From b7bd06bd849feab239900d2fd7622787ac48c112 Mon Sep 17 00:00:00 2001 From: YouWei Zhao Date: Mon, 27 Aug 2018 14:35:47 +0800 Subject: [PATCH] fix gameCanvas.style in editor-mobile --- libs/maps.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libs/maps.js b/libs/maps.js index d496a9c7..2e3a9c4f 100644 --- a/libs/maps.js +++ b/libs/maps.js @@ -192,6 +192,10 @@ maps.prototype.resizeMap = function(floorId) { core.canvas[cn].canvas.setAttribute("height",cheight); core.canvas[cn].canvas.style.width = cwidth*core.domStyle.scale + "px"; core.canvas[cn].canvas.style.height = cheight*core.domStyle.scale + "px"; + if(main.mode==='editor' && editor.isMobile){ + core.canvas[cn].canvas.style.width = core.bigmap.width*32/416*96 + "vw"; + core.canvas[cn].canvas.style.height = core.bigmap.height*32/416*96 + "vw"; + } }); }