fix(core): use noop viewport operations instead of waiting for promise
This commit is contained in:
@@ -39,13 +39,6 @@ export class Storage {
|
||||
|
||||
const reactiveState = reactive(state)
|
||||
|
||||
const nodeIds = computed(() => reactiveState.nodes.map((n) => n.id))
|
||||
const edgeIds = computed(() => reactiveState.edges.map((e) => e.id))
|
||||
|
||||
const getters = useGetters(reactiveState, nodeIds, edgeIds)
|
||||
|
||||
const actions = useActions(reactiveState, getters, nodeIds, edgeIds)
|
||||
|
||||
const hooksOn = <any>{}
|
||||
Object.entries(reactiveState.hooks).forEach(([n, h]) => {
|
||||
const name = `on${n.charAt(0).toUpperCase() + n.slice(1)}`
|
||||
@@ -57,6 +50,13 @@ export class Storage {
|
||||
emits[n] = h.trigger
|
||||
})
|
||||
|
||||
const nodeIds = computed(() => reactiveState.nodes.map((n) => n.id))
|
||||
const edgeIds = computed(() => reactiveState.edges.map((e) => e.id))
|
||||
|
||||
const getters = useGetters(reactiveState, nodeIds, edgeIds)
|
||||
|
||||
const actions = useActions(id, emits, hooksOn, reactiveState, getters, nodeIds, edgeIds)
|
||||
|
||||
actions.setState(reactiveState)
|
||||
|
||||
const flow: VueFlowStore = {
|
||||
|
||||
Reference in New Issue
Block a user