From 740b96baf36250e4295b51c4e37c2f43ae4d0fdd Mon Sep 17 00:00:00 2001 From: YouWei Zhao Date: Mon, 27 Aug 2018 23:55:53 +0800 Subject: [PATCH] fix editor: import bigmap --- _server/editor.js | 2 +- _server/vm.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/_server/editor.js b/_server/editor.js index cbb4f6d1..612df88f 100644 --- a/_server/editor.js +++ b/_server/editor.js @@ -163,7 +163,7 @@ editor.prototype.mapInit = function () { ec.clearRect(0, 0, core.bigmap.width*32, core.bigmap.height*32); document.getElementById('event2').getContext('2d').clearRect(0, 0, core.bigmap.width*32, core.bigmap.height*32); editor.map = []; - var sy=editor.currentFloorData.map.length,sy=editor.currentFloorData.map[0].length; + var sy=editor.currentFloorData.map.length,sx=editor.currentFloorData.map[0].length; for (var y = 0; y < sy; y++) { editor.map[y] = []; for (var x = 0; x < sx; x++) { diff --git a/_server/vm.js b/_server/vm.js index addb20eb..7f932169 100644 --- a/_server/vm.js +++ b/_server/vm.js @@ -168,7 +168,7 @@ var editArea = new Vue({ var formatArrStr = ''; var that = this; clearTimeout(that.formatTimer); - var si=this.mapArr.length,sk=this.mapArr[0].length; + var si=editor.map.length,sk=editor.map[0].length; if (this.mapArr.split(/\D+/).join(' ').trim().split(' ').length != si*sk) return false; var arr = this.mapArr.replace(/\s+/g, '').split('],[');