Skip to content

Commit

Permalink
Avoid resizing generated image when it has been rendered by server #2…
Browse files Browse the repository at this point in the history
…01Avoid resizing generated image when it has been rendered by server #201
  • Loading branch information
lowlighter committed Mar 28, 2021
1 parent 2917325 commit 1b844ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/app/web/statics/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 1b844ae

Please sign in to comment.