Merge pull request #197 from zhaouv/v2.x

fix
This commit is contained in:
Zhang Chen 2018-08-27 23:57:20 +08:00 committed by GitHub
commit fe4d2e6e85
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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

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