1
0
Fork 0
mirror of synced 2024-09-20 11:27:56 +12:00

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

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)
}