Skip resizing when height set to auto

This commit is contained in:
lowlighter
2021-06-09 19:20:55 +02:00
parent 31315ad3a4
commit 0590a252b8

View File

@@ -336,6 +336,9 @@ export const svg = {
width = Math.ceil(width * padding.width + padding.absolute.width)
console.debug(`bounds after applying padding width=${width} (*${padding.width}+${padding.absolute.width}), height=${height} (*${padding.height}+${padding.absolute.height})`)
//Resize svg
if (document.querySelector("svg").getAttribute("height") === "auto")
console.debug("skipped height resizing because it was set to \"auto\"")
else
document.querySelector("svg").setAttribute("height", height)
//Enable animations
if (animated)