大地图绘制缩略图

This commit is contained in:
ckcz123 2020-07-03 22:18:37 +08:00
parent 3523358cba
commit 42e7ee0372
2 changed files with 645 additions and 646 deletions

View File

@ -1412,11 +1412,10 @@ maps.prototype._drawThumbnail_drawTempCanvas = function (floorId, blocks, option
// 如果是大地图模式? // 如果是大地图模式?
if (options.all) { if (options.all) {
// 计算比例 // 计算比例
var scaleX = core.__SIZE__ / width; var scale = Math.max(core.__SIZE__ / width, core.__SIZE__ / height);
var scaleY = core.__SIZE__ / height; tempCanvas.canvas.width = width * 32 * scale;
tempCanvas.canvas.width = width * 32 * scaleX; tempCanvas.canvas.height = height * 32 * scale;
tempCanvas.canvas.height = height * 32 * scaleY; tempCanvas.scale(scale, scale);
tempCanvas.scale(scaleX, scaleY);
} else if (width * height > core.bigmap.threshold) { } else if (width * height > core.bigmap.threshold) {
options.v2 = true; options.v2 = true;
tempCanvas.canvas.width = core.__PIXELS__; tempCanvas.canvas.width = core.__PIXELS__;

File diff suppressed because it is too large Load Diff