refactor(core): use pre flush in NodeWrapper

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
braks
2023-01-07 18:04:19 +01:00
committed by Braks
parent 6596673726
commit 7a416eae61
@@ -136,11 +136,11 @@ watch(
{ flush: 'pre', immediate: true }, { flush: 'pre', immediate: true },
) )
watch([() => node.extent, () => nodeExtent], updatePosition) watch([() => node.extent, () => nodeExtent], updatePosition, { flush: 'pre' })
// todo: do we need to wait for initialized? Or can we clamp the position immediately? // todo: do we need to wait for initialized? Or can we clamp the position immediately?
until(() => node.initialized) until(() => node.initialized)
.toBe(true) .toBe(true, { flush: 'pre' })
.then(updatePosition) .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 */