export flow

This commit is contained in:
STEINNI
2026-03-23 20:21:57 +00:00
parent 266036a6ec
commit 334cce8af3
3 changed files with 60 additions and 32 deletions

View File

@@ -1146,14 +1146,14 @@ class BZgraflow extends Buildoz{
return(crossLayerLinks)
}
autofit(){
autofit(percent=100){
const parentBB = this.parentElement.getBoundingClientRect()
// Use scroll dimensions for actual content extent (nodes can extend beyond element bounds)
const contentW = Math.max(this.scrollWidth || this.offsetWidth || 1, 1)
const contentH = Math.max(this.scrollHeight || this.offsetHeight || 1, 1)
const sx = parentBB.width / contentW
const sy = parentBB.height / contentH
const scale = Math.min(sx, sy) // uniform scale to fit inside parent
const scale = Math.min(sx, sy)*(percent/100) // uniform scale to fit inside parent
this.style.transformOrigin = 'top left'
this.style.transform = `scale(${scale})`
}
@@ -1245,7 +1245,7 @@ class MovingNodes{
node.style.left = `${x}px`
node.style.top = `${y}px`
node.style.margin = '0'
node.style.zIndex = '9999'
node.style.zIndex = '3'
node.style.pointerEvents = 'none'
}