export flow
This commit is contained in:
@@ -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'
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user