refactor(nodes): minimize position change loops

# What's changed?

* Only loop selected nodes instead of all nodes when determining position changes
This commit is contained in:
Braks
2022-04-24 13:34:22 +02:00
parent e2fd3b44ef
commit 0becad73ad
3 changed files with 11 additions and 13 deletions
@@ -104,9 +104,7 @@ onMounted(() => {
onBeforeUnmount(() => observer.stop())
updateNodeDimensions([{ id: node.id, nodeElement: nodeElement.value, forceUpdate: true }])
})
onMounted(() => {
watch(
[() => node.position, () => parent?.computedPosition, () => node.selected, () => parent?.selected],
([pos, parent]) => {