better autofit signature
This commit is contained in:
+3
-3
@@ -514,8 +514,8 @@ class BZgraflow extends Buildoz{
|
|||||||
const autofitTween = (autofitAttr !== null && autofitAttr !== '' && !Number.isNaN(parseFloat(autofitAttr)))
|
const autofitTween = (autofitAttr !== null && autofitAttr !== '' && !Number.isNaN(parseFloat(autofitAttr)))
|
||||||
? parseFloat(autofitAttr)
|
? parseFloat(autofitAttr)
|
||||||
: undefined
|
: undefined
|
||||||
if(this._canRunAutoPlace()) this.autofit(100, autofitTween)
|
if(this._canRunAutoPlace()) this.autofit(autofitTween)
|
||||||
else this._scheduleLayoutWhenReady(() => this.autofit(100, autofitTween))
|
else this._scheduleLayoutWhenReady(() => this.autofit(autofitTween))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const onLayoutComplete = () => {
|
const onLayoutComplete = () => {
|
||||||
@@ -1332,7 +1332,7 @@ class BZgraflow extends Buildoz{
|
|||||||
return(crossLayerLinks)
|
return(crossLayerLinks)
|
||||||
}
|
}
|
||||||
|
|
||||||
autofit(percent=100, tween = 0){
|
autofit(tween = 0, percent=100){
|
||||||
const outwidth = Math.max(this.clientWidth, 1)
|
const outwidth = Math.max(this.clientWidth, 1)
|
||||||
const outheight = Math.max(this.clientHeight, 1)
|
const outheight = Math.max(this.clientHeight, 1)
|
||||||
let inwidth = this.nodesContainer.scrollWidth
|
let inwidth = this.nodesContainer.scrollWidth
|
||||||
|
|||||||
Reference in New Issue
Block a user