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
|
||||
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)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue