Fix changeFloor number

This commit is contained in:
oc 2018-09-04 22:44:15 +08:00
parent a675d78d9b
commit 10cf507016
2 changed files with 4 additions and 3 deletions

View File

@ -333,6 +333,10 @@ editor.prototype.changeFloor = function (floorId, callback) {
})
});
core.changeFloor(floorId, null, {"x": 0, "y": 0, "direction": "up"}, null, function () {
core.bigmap.offsetX=0;
core.bigmap.offsetY=0;
editor.moveViewport(0,0);
editor.drawMapBg();
var mapArray = core.maps.save(core.status.maps, core.status.floorId);
editor.map = mapArray.map(function (v) {

View File

@ -441,10 +441,7 @@ editor_mode = function (editor) {
selectFloor.onchange = function () {
editor_mode.onmode('nextChange');
editor_mode.onmode('floor');
core.bigmap.offsetX=0;
core.bigmap.offsetY=0;
editor.changeFloor(selectFloor.value);
editor.moveViewport(0,0);
}
});