diff --git a/_server/editor.js b/_server/editor.js index f90a9b6f..77b802e1 100644 --- a/_server/editor.js +++ b/_server/editor.js @@ -298,7 +298,7 @@ editor.prototype.updateMap = function () { var evs = {}; if (editor.currentFloorData && editor.currentFloorData.events) { for (var loc in editor.currentFloorData.events) { - if (editor.currentFloorData.events[loc].animate == false) + if ((editor.currentFloorData.events[loc]||{}).animate == false) evs[loc] = {"animate": false}; } } diff --git a/libs/ui.js b/libs/ui.js index 0ca964c4..d658802a 100644 --- a/libs/ui.js +++ b/libs/ui.js @@ -562,14 +562,10 @@ ui.prototype.drawTextBox = function(content, showAll) { validWidth = this.calTextBoxWidth('ui', realContent, min_width, max_width); width = validWidth + leftSpace + rightSpace; // left必须在7~416-7-width区间内,以保证left>=7,right<=416-7 - left = core.clamp(32*px+16-width/2, 7, 416-7-width); - - left -= core.bigmap.offsetX; - + left = core.clamp(32*px+16-width/2-core.bigmap.offsetX, 7, 416-7-width); right = left + width; } - var content_left = left + leftSpace; var height = 30 + (textfont+5)*core.splitLines("ui", realContent, validWidth, font).length; if (core.isset(name)) height += titlefont + 5;