revert(core): await node initialization before clamping initial pos
Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
@@ -147,7 +147,9 @@ watch([() => node.extent, () => nodeExtent], ([nodeExtent, globalExtent], [oldNo
|
|||||||
})
|
})
|
||||||
|
|
||||||
// clamp initial position to nodes' extent
|
// 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 */
|
/** this re-calculates the current position, necessary for clamping by a node's extent */
|
||||||
function updatePosition() {
|
function updatePosition() {
|
||||||
|
|||||||
Reference in New Issue
Block a user