From 9b0cb2582e3c35e52be55a76fb48e145e5955206 Mon Sep 17 00:00:00 2001 From: STEINNI Date: Thu, 30 Jul 2026 12:24:26 +0000 Subject: [PATCH] better autofit signature --- bzGraflow.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bzGraflow.js b/bzGraflow.js index 375961a..78bc95c 100644 --- a/bzGraflow.js +++ b/bzGraflow.js @@ -514,8 +514,8 @@ class BZgraflow extends Buildoz{ const autofitTween = (autofitAttr !== null && autofitAttr !== '' && !Number.isNaN(parseFloat(autofitAttr))) ? parseFloat(autofitAttr) : undefined - if(this._canRunAutoPlace()) this.autofit(100, autofitTween) - else this._scheduleLayoutWhenReady(() => this.autofit(100, autofitTween)) + if(this._canRunAutoPlace()) this.autofit(autofitTween) + else this._scheduleLayoutWhenReady(() => this.autofit(autofitTween)) } } const onLayoutComplete = () => { @@ -1332,7 +1332,7 @@ class BZgraflow extends Buildoz{ return(crossLayerLinks) } - autofit(percent=100, tween = 0){ + autofit(tween = 0, percent=100){ const outwidth = Math.max(this.clientWidth, 1) const outheight = Math.max(this.clientHeight, 1) let inwidth = this.nodesContainer.scrollWidth