From 342ac9186140a8d32c44c803a662823a87145484 Mon Sep 17 00:00:00 2001 From: Fen Dweller Date: Thu, 13 Feb 2020 17:20:07 -0500 Subject: [PATCH] Make scroll-resizing work with auto-world size --- macrovision.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/macrovision.js b/macrovision.js index 585e212b..ec69fc83 100644 --- a/macrovision.js +++ b/macrovision.js @@ -715,6 +715,7 @@ document.addEventListener("DOMContentLoaded", () => { config.height = math.multiply(config.height, dir); updateWorldOptions(); } + checkFitWorld(); updateSizes(); }) document.querySelector("body").appendChild(testCtx.canvas); @@ -918,6 +919,11 @@ document.addEventListener("touchmove", (e) => { } }, { passive: false }); +function checkFitWorld() { + if (config.autoFit) { + fitWorld(); + } +} function fitWorld() { let max = math.unit(0, "meter");