This commit is contained in:
STEINNI
2026-04-10 14:35:21 +00:00
+7 -3
View File
@@ -230,14 +230,18 @@ class BZgraflow extends Buildoz{
// scaled down so it fits exactly inside the clicked node, then animate it to full size. // scaled down so it fits exactly inside the clicked node, then animate it to full size.
const nodeBB = nodeEl.getBoundingClientRect() const nodeBB = nodeEl.getBoundingClientRect()
const parentBB = this.getBoundingClientRect() const parentBB = this.getBoundingClientRect()
const flowNode = this.flow?.nodes?.find(n => n.id === id) const flowNode = this.flow?.nodes?.find(n => n.id === id)
const flowUrl = flowNode.subflow.url
const childEl = document.createElement('bz-graflow') const childEl = document.createElement('bz-graflow')
childEl.isSubflow = true childEl.isSubflow = true
childEl.currentOrientation = this.currentOrientation childEl.currentOrientation = this.currentOrientation
childEl.setAttribute('flow', flowUrl) if(flowNode.subflow.url) childEl.setAttribute('flow', flowNode.subflow.url)
else {
childEl.addEventListener('bz:graflow:domConnected', (e) => {
e.detail.graflow.loadFlow(flowNode.subflow.flow)
})
}
childEl.setAttribute('tension', this.getBZAttribute('tension') || '60') childEl.setAttribute('tension', this.getBZAttribute('tension') || '60')
// Remember which node we "came from" so exitSubflow() can animate back to it. // Remember which node we "came from" so exitSubflow() can animate back to it.
childEl.dataset.enterNodeId = id childEl.dataset.enterNodeId = id