Improve responsiveness of settings bar

This commit is contained in:
Andrew Kingston 2024-08-10 10:42:54 +01:00
parent 933942ef26
commit a6fd2ceb47
No known key found for this signature in database
1 changed files with 4 additions and 0 deletions

View File

@ -144,11 +144,15 @@
const node = document.getElementsByClassName(`${id}-dom`)[0]?.parentNode
if (node) {
observer = new MutationObserver(() => {
console.log("get computed")
computedStyles = getComputedStyle(node)
updatePosition()
})
observer.observe(node, {
attributes: true,
attributeFilter: ["style"],
childList: false,
subtree: false,
})
computedStyles = getComputedStyle(node)
}