1
0
Fork 0
mirror of synced 2024-09-20 19:33:10 +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 const node = document.getElementsByClassName(`${id}-dom`)[0]?.parentNode
if (node) { if (node) {
observer = new MutationObserver(() => { observer = new MutationObserver(() => {
console.log("get computed")
computedStyles = getComputedStyle(node) computedStyles = getComputedStyle(node)
updatePosition()
}) })
observer.observe(node, { observer.observe(node, {
attributes: true, attributes: true,
attributeFilter: ["style"], attributeFilter: ["style"],
childList: false,
subtree: false,
}) })
computedStyles = getComputedStyle(node) computedStyles = getComputedStyle(node)
} }