Merge branch 'main' of https://gitea.internike.com/nike/buildoz
This commit is contained in:
+6
-2
@@ -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
|
||||||
|
if(!this.isSubflow) {
|
||||||
this.style.transformOrigin = prevTransformOrigin || 'top left'
|
this.style.transformOrigin = prevTransformOrigin || 'top left'
|
||||||
// First normalize content origin to (0,0), then scale to fit.
|
|
||||||
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)
|
||||||
|
|||||||
Reference in New Issue
Block a user