diff --git a/libs/events.js b/libs/events.js index d351f2e5..16f3ed3e 100644 --- a/libs/events.js +++ b/libs/events.js @@ -1814,7 +1814,7 @@ events.prototype.moveImage = function (code, to, opacityVal, time, callback) { var animate = setInterval(function () { step++; moveStep(); - if (step > steps) { + if (step == steps) { if (core.isset(opacityVal)) core.setOpacity(name, opacityVal); delete core.animateFrame.asyncId[animate]; diff --git a/libs/maps.js b/libs/maps.js index 3ad953a4..c0ba3b1f 100644 --- a/libs/maps.js +++ b/libs/maps.js @@ -208,13 +208,14 @@ maps.prototype.decompressMap = function (mapArr, floorId) { var mw = core.floors[floorId].width || 13; var mh = core.floors[floorId].height || 13; for (var x=0;x content_left + valid_width) { - index--; - offsetx = content_left; - offsety += per_height; - return drawNext(); - } + var charwidth = core.calWidth(canvas, ch); + if (core.isset(valid_width) && offsetx + charwidth > content_left + valid_width) { + index--; + offsetx = content_left; + offsety += per_height; + return drawNext(); } // 输出 core.fillText(canvas, ch, offsetx, offsety); @@ -831,7 +830,7 @@ ui.prototype.drawScrollText = function (content, time, callback) { tempCanvas.clearRect(0, 0, width, height); tempCanvas.font = font; - this.__drawText(tempCanvas, content, 0, textfont, null, textColor, 1.4*textfont, 0); + this.__drawText(tempCanvas, content, offset, textfont, null, textColor, 1.4*textfont, 0); // 开始绘制到UI上 core.clearMap('ui'); @@ -967,7 +966,6 @@ ui.prototype.drawChoices = function(content, choices) { } } - core.setTextAlign('ui', 'left'); core.setFont('ui', 'bold 15px '+globalFont); this.__drawText('ui', content, content_left, content_top, validWidth, textColor, 20, 0); } diff --git a/main.js b/main.js index aa3b6d8e..802e058b 100644 --- a/main.js +++ b/main.js @@ -316,7 +316,7 @@ main.prototype.setMainTipsText = function (text) { main.prototype.log = function (e) { if (e) { if (main.core && main.core.platform && !main.core.platform.isPC) { - console.log((e.stack || e.toString()).replace("\n", " --- ")); + console.log((e.stack || e.toString())); } else { console.log(e);