refactor(nodes): only update position on mount

This commit is contained in:
braks
2022-10-07 22:55:38 +02:00
committed by Braks
parent ee56ddb0cf
commit 70dd73fb3a
@@ -95,7 +95,14 @@ onUpdateNodeInternals((updateIds) => {
})
onMounted(() => {
updateInternals()
updatePosition(
{
x: node.position.x,
y: node.position.y,
z: node.computedPosition.z ? node.computedPosition.z : node.selected ? 1000 : 0,
},
parentNode ? { ...parentNode.computedPosition } : undefined,
)
if (!scope) scope = effectScope()