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 57d460d3..f37956c5 100644 --- a/_server/vm.js +++ b/_server/vm.js @@ -170,7 +170,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('],[');