From dc1ba40454300c67177de04f972abf2134d6e574 Mon Sep 17 00:00:00 2001 From: unanmed <1319491857@qq.com> Date: Mon, 11 Jul 2022 21:59:32 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BC=A9=E7=95=A5=E5=9B=BE=E7=BB=98=E5=88=B6?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libs/maps.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libs/maps.js b/libs/maps.js index 026b726f..d749a853 100644 --- a/libs/maps.js +++ b/libs/maps.js @@ -1836,13 +1836,16 @@ maps.prototype._drawThumbnail_drawToTarget = function (floorId, options) { else { // 只绘制可见窗口 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 { var offsetX = core.clamp(centerX - core.__HALF_SIZE__, 0, width - core.__SIZE__), offsetY = core.clamp(centerY - core.__HALF_SIZE__, 0, height - core.__SIZE__); var scale = core.domStyle.scale; - if (options.noHD) scale = 1; - core.drawImage(ctx, tempCanvas.canvas, offsetX * 32 * scale, offsetY * 32 * scale, core.__PIXELS__ * scale, core.__PIXELS__ * scale, x, y, size, size); + if (options.noHD) { + 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); } }