From eeb9c6a912d0400a24afde86f65b86c7f99b023e Mon Sep 17 00:00:00 2001 From: oc Date: Sun, 9 Jun 2019 00:00:01 +0800 Subject: [PATCH] Fix uievent drawThumbnail --- _server/editor_unsorted_3.js | 2 ++ libs/maps.js | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/_server/editor_unsorted_3.js b/_server/editor_unsorted_3.js index fd6ec89e..b0adaa5c 100644 --- a/_server/editor_unsorted_3.js +++ b/_server/editor_unsorted_3.js @@ -481,6 +481,8 @@ uievent.selectPoint = function (floorId, x, y, hideFloor, callback) { uievent.updateSelectPoint = function (redraw) { uievent.elements.title.innerText = '地图选点 ('+uievent.values.x+","+uievent.values.y+')'; if (redraw) { + core.setAlpha('uievent', 1); + core.clearMap('uievent'); core.drawThumbnail(uievent.values.floorId, null, null, {ctx: 'uievent', centerX: uievent.values.left + core.__HALF_SIZE__, centerY: uievent.values.top + core.__HALF_SIZE__}); diff --git a/libs/maps.js b/libs/maps.js index 4617651a..81a70157 100644 --- a/libs/maps.js +++ b/libs/maps.js @@ -363,7 +363,8 @@ maps.prototype._getBgFgMapArray = function (name, floorId, noCache) { return core.status[name + "maps"][floorId]; var arr = core.clone(core.floors[floorId][name + "map"] || []); - if (main.mode == 'editor') arr = core.clone(editor[name + "map"]) || arr; + if (main.mode == 'editor' && !(uievent && uievent.isOpen)) + arr = core.clone(editor[name + "map"]) || arr; for (var x = 0; x < width; x++) { for (var y = 0; y < height; y++) { arr[y] = arr[y] || [];