refactor(core): immediately set initialized flag

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
braks
2023-02-22 20:20:11 +01:00
committed by Braks
parent b5103dbb7e
commit 4b2a978e3a
+2 -1
View File
@@ -125,6 +125,7 @@ export function useActions(state: State, getters: ComputedGetters): Actions {
node.handleBounds.source = getHandleBounds('.source', update.nodeElement, zoom)
node.handleBounds.target = getHandleBounds('.target', update.nodeElement, zoom)
node.dimensions = dimensions
node.initialized = true
res.push({
id: node.id,
@@ -261,7 +262,7 @@ export function useActions(state: State, getters: ComputedGetters): Actions {
const setNodeExtent: Actions['setNodeExtent'] = async (nodeExtent) => {
state.nodeExtent = nodeExtent
const nodeIds = getters.getNodes.value.map((n) => n.id)
const nodeIds = getters.getNodes.value.filter((n) => n.initialized).map((n) => n.id)
updateNodeInternals(nodeIds)
}