Merge branch 'v2.0' of https://github.com/ckcz123/mota-js into v2.0

This commit is contained in:
oc 2018-08-27 23:59:21 +08:00
commit 3422b07590
2 changed files with 2 additions and 2 deletions

View File

@ -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++) {

View File

@ -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('],[');