This commit is contained in:
STEINNI
2026-04-14 14:10:35 +00:00
+8 -4
View File
@@ -272,7 +272,6 @@ class BZgraflow extends Buildoz{
}) })
} }
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
const btnExitSubflow = document.createElement('button') const btnExitSubflow = document.createElement('button')
@@ -1232,9 +1231,14 @@ class BZgraflow extends Buildoz{
const scale = Math.min(sx, sy)*(percent/100) // uniform scale to fit inside parent const scale = Math.min(sx, sy)*(percent/100) // uniform scale to fit inside parent
const tx = Number.isFinite(left) ? (-left + gapx) : gapx const tx = Number.isFinite(left) ? (-left + gapx) : gapx
const ty = Number.isFinite(top) ? (-top + gapy) : gapy const ty = Number.isFinite(top) ? (-top + gapy) : gapy
this.style.transformOrigin = prevTransformOrigin || 'top left' if(!this.isSubflow) {
// First normalize content origin to (0,0), then scale to fit. this.style.transformOrigin = prevTransformOrigin || 'top left'
this.style.transform = `scale(${scale}) translate(${tx}px, ${ty}px)` this.style.transform = `scale(${scale}) translate(${tx}px, ${ty}px)`
} else {
this.style.transform = `scale(${scale})`
this.style.width = `calc(100% / ${scale})` // means 100% of the parent node DESPITE the scaling
this.style.height = `calc(100% / ${scale})` // means 100% of the parent node DESPITE the scaling
}
} }
} }
Buildoz.define('graflow', BZgraflow) Buildoz.define('graflow', BZgraflow)