fix editor.viewportLoc

This commit is contained in:
YouWei Zhao 2019-10-19 09:06:58 +08:00
parent 0974600134
commit 5305533da9

View File

@ -344,6 +344,7 @@ editor.prototype.updateMap = function () {
editor.prototype.setViewport=function (x, y) { editor.prototype.setViewport=function (x, y) {
core.bigmap.offsetX = core.clamp(x, 0, 32*core.bigmap.width-core.__PIXELS__); core.bigmap.offsetX = core.clamp(x, 0, 32*core.bigmap.width-core.__PIXELS__);
core.bigmap.offsetY = core.clamp(y, 0, 32*core.bigmap.height-core.__PIXELS__); core.bigmap.offsetY = core.clamp(y, 0, 32*core.bigmap.height-core.__PIXELS__);
editor.viewportLoc = editor.viewportLoc || {};
editor.viewportLoc[editor.currentFloorId] = [core.bigmap.offsetX, core.bigmap.offsetY]; editor.viewportLoc[editor.currentFloorId] = [core.bigmap.offsetX, core.bigmap.offsetY];
core.control.updateViewport(); core.control.updateViewport();
editor.buildMark(); editor.buildMark();