revert(core): await node initialization before clamping initial pos

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
braks
2023-01-18 20:47:32 +01:00
committed by Braks
parent 84ffd50429
commit de311361bf
@@ -147,7 +147,9 @@ watch([() => node.extent, () => nodeExtent], ([nodeExtent, globalExtent], [oldNo
})
// clamp initial position to nodes' extent
updatePosition()
until(() => node.initialized)
.toBe(true)
.then(updatePosition)
/** this re-calculates the current position, necessary for clamping by a node's extent */
function updatePosition() {