This commit is contained in:
oc 2018-12-14 10:19:41 +08:00
parent 2f2b20956b
commit f838ef3997
2 changed files with 2 additions and 6 deletions

View File

@ -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};
}
}

View File

@ -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>=7right<=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;