Graflow: standardized event signatures between floLoaded and subflowLoaded
This commit is contained in:
+8
-2
@@ -142,7 +142,10 @@ class BZgraflow extends Buildoz{
|
||||
await this.loadNodes(flowObj.nodesFile)
|
||||
this.flow = flowObj.flow
|
||||
this.refresh()
|
||||
this.fireEvent('flowLoaded', { url: source instanceof Blob ? null : source, blob: source instanceof Blob ? source : null })
|
||||
this.fireEvent('flowLoaded', {
|
||||
parentNodeId: null,
|
||||
component: this,
|
||||
})
|
||||
}
|
||||
|
||||
initFlow(){
|
||||
@@ -325,7 +328,10 @@ class BZgraflow extends Buildoz{
|
||||
childEl.style.transform = 'none' // Important for nested subflows to position correctly
|
||||
childEl.style.willChange = ''
|
||||
childEl.style.overflow = 'auto'
|
||||
this.fireEvent('subflowLoaded', { parentNodeId: id, subflow: childEl })
|
||||
this.fireEvent('subflowLoaded', {
|
||||
parentNodeId: id,
|
||||
component: childEl
|
||||
})
|
||||
}, { once:true })
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user