Fix Bugs
This commit is contained in:
parent
2f2b20956b
commit
f838ef3997
@ -298,7 +298,7 @@ editor.prototype.updateMap = function () {
|
|||||||
var evs = {};
|
var evs = {};
|
||||||
if (editor.currentFloorData && editor.currentFloorData.events) {
|
if (editor.currentFloorData && editor.currentFloorData.events) {
|
||||||
for (var loc in 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};
|
evs[loc] = {"animate": false};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -562,14 +562,10 @@ ui.prototype.drawTextBox = function(content, showAll) {
|
|||||||
validWidth = this.calTextBoxWidth('ui', realContent, min_width, max_width);
|
validWidth = this.calTextBoxWidth('ui', realContent, min_width, max_width);
|
||||||
width = validWidth + leftSpace + rightSpace;
|
width = validWidth + leftSpace + rightSpace;
|
||||||
// left必须在7~416-7-width区间内,以保证left>=7,right<=416-7
|
// left必须在7~416-7-width区间内,以保证left>=7,right<=416-7
|
||||||
left = core.clamp(32*px+16-width/2, 7, 416-7-width);
|
left = core.clamp(32*px+16-width/2-core.bigmap.offsetX, 7, 416-7-width);
|
||||||
|
|
||||||
left -= core.bigmap.offsetX;
|
|
||||||
|
|
||||||
right = left + width;
|
right = left + width;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
var content_left = left + leftSpace;
|
var content_left = left + leftSpace;
|
||||||
var height = 30 + (textfont+5)*core.splitLines("ui", realContent, validWidth, font).length;
|
var height = 30 + (textfont+5)*core.splitLines("ui", realContent, validWidth, font).length;
|
||||||
if (core.isset(name)) height += titlefont + 5;
|
if (core.isset(name)) height += titlefont + 5;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user