Graflow: standardized event signatures between floLoaded and subflowLoaded

This commit is contained in:
STEINNI
2026-04-16 08:03:32 +00:00
parent a871288c1c
commit 3e7a82edc2
8 changed files with 15 additions and 9 deletions
+8 -2
View File
@@ -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 })
}