缩略图绘制问题
This commit is contained in:
parent
081ba80f9b
commit
dc1ba40454
@ -1836,13 +1836,16 @@ maps.prototype._drawThumbnail_drawToTarget = function (floorId, options) {
|
|||||||
else {
|
else {
|
||||||
// 只绘制可见窗口
|
// 只绘制可见窗口
|
||||||
if (options.v2) {
|
if (options.v2) {
|
||||||
core.drawImage(ctx, tempCanvas.canvas, 0, 0, core.__PIXELS__, core.__PIXELS__, x, y, size, size);
|
core.drawImage(ctx, tempCanvas.canvas, 0, 0, core.__PIXELS__ * core.domStyle.ratio, core.__PIXELS__ * core.domStyle.ratio, x, y, size, size);
|
||||||
} else {
|
} else {
|
||||||
var offsetX = core.clamp(centerX - core.__HALF_SIZE__, 0, width - core.__SIZE__),
|
var offsetX = core.clamp(centerX - core.__HALF_SIZE__, 0, width - core.__SIZE__),
|
||||||
offsetY = core.clamp(centerY - core.__HALF_SIZE__, 0, height - core.__SIZE__);
|
offsetY = core.clamp(centerY - core.__HALF_SIZE__, 0, height - core.__SIZE__);
|
||||||
var scale = core.domStyle.scale;
|
var scale = core.domStyle.scale;
|
||||||
if (options.noHD) scale = 1;
|
if (options.noHD) {
|
||||||
core.drawImage(ctx, tempCanvas.canvas, offsetX * 32 * scale, offsetY * 32 * scale, core.__PIXELS__ * scale, core.__PIXELS__ * scale, x, y, size, size);
|
scale = 1;
|
||||||
|
core.drawImage(ctx, tempCanvas.canvas, offsetX * 32, offsetY * 32, core.__PIXELS__, core.__PIXELS__, x, y, size, size);
|
||||||
|
}
|
||||||
|
core.drawImage(ctx, tempCanvas.canvas, offsetX * 32 * core.domStyle.ratio, offsetY * 32 * core.domStyle.ratio, core.__PIXELS__ * core.domStyle.ratio, core.__PIXELS__ * core.domStyle.ratio, x, y, size, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user