refactor(core): immediately set initialized flag
Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
@@ -125,6 +125,7 @@ export function useActions(state: State, getters: ComputedGetters): Actions {
|
|||||||
node.handleBounds.source = getHandleBounds('.source', update.nodeElement, zoom)
|
node.handleBounds.source = getHandleBounds('.source', update.nodeElement, zoom)
|
||||||
node.handleBounds.target = getHandleBounds('.target', update.nodeElement, zoom)
|
node.handleBounds.target = getHandleBounds('.target', update.nodeElement, zoom)
|
||||||
node.dimensions = dimensions
|
node.dimensions = dimensions
|
||||||
|
node.initialized = true
|
||||||
|
|
||||||
res.push({
|
res.push({
|
||||||
id: node.id,
|
id: node.id,
|
||||||
@@ -261,7 +262,7 @@ export function useActions(state: State, getters: ComputedGetters): Actions {
|
|||||||
const setNodeExtent: Actions['setNodeExtent'] = async (nodeExtent) => {
|
const setNodeExtent: Actions['setNodeExtent'] = async (nodeExtent) => {
|
||||||
state.nodeExtent = 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)
|
updateNodeInternals(nodeIds)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user