From 1b844ae244663821bd91c4b247ddf88b340acd49 Mon Sep 17 00:00:00 2001 From: lowlighter <22963968+lowlighter@users.noreply.github.com> Date: Sun, 28 Mar 2021 12:32:50 +0200 Subject: [PATCH] Avoid resizing generated image when it has been rendered by server #201Avoid resizing generated image when it has been rendered by server #201 --- source/app/web/statics/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/app/web/statics/app.js b/source/app/web/statics/app.js index ae70f4c3..d77b51c6 100644 --- a/source/app/web/statics/app.js +++ b/source/app/web/statics/app.js @@ -191,7 +191,7 @@ //Resize mock image mockresize() { const svg = document.querySelector(".preview .image svg") - if (svg) { + if ((svg)&&(svg.getAttribute("height") === 99999)) { const height = svg.querySelector("#metrics-end")?.getBoundingClientRect()?.y-svg.getBoundingClientRect()?.y if (Number.isFinite(height)) svg.setAttribute("height", height)