Improve responsiveness of settings bar
This commit is contained in:
parent
933942ef26
commit
a6fd2ceb47
|
@ -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)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue