graflow: orientation as param
This commit is contained in:
+7
-2
@@ -264,7 +264,7 @@ class BZgraflow extends Buildoz{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
childEl.autoPlace(this.currentOrientation, 60, 60)
|
childEl.autoPlace(this.currentOrientation, parseInt(this.getBZAttribute('gapx')) || 80, parseInt(this.getBZAttribute('gapy')) || 80)
|
||||||
}, { once:true })
|
}, { once:true })
|
||||||
|
|
||||||
// Fade out the current (host) graflow while the child scales up
|
// Fade out the current (host) graflow while the child scales up
|
||||||
@@ -442,11 +442,16 @@ class BZgraflow extends Buildoz{
|
|||||||
this.addWire(link)
|
this.addWire(link)
|
||||||
}
|
}
|
||||||
if(!this.currentOrientation) {
|
if(!this.currentOrientation) {
|
||||||
|
if(this.getBZAttribute('orientation')) {
|
||||||
|
this.currentOrientation = this.getBZAttribute('orientation')
|
||||||
|
} else {
|
||||||
const bb=this.getBoundingClientRect()
|
const bb=this.getBoundingClientRect()
|
||||||
if(bb.width > bb.height) this.currentOrientation = 'horizontal'
|
if(bb.width > bb.height) this.currentOrientation = 'horizontal'
|
||||||
else this.currentOrientation = 'vertical'
|
else this.currentOrientation = 'vertical'
|
||||||
}
|
}
|
||||||
if(forceAutoplace) this.autoPlace(this.currentOrientation)
|
}
|
||||||
|
console.log('forceAutoplace', forceAutoplace, this.currentOrientation)
|
||||||
|
if(forceAutoplace) this.autoPlace(this.currentOrientation, parseInt(this.getBZAttribute('gapx')) || 80, parseInt(this.getBZAttribute('gapy')) || 80)
|
||||||
this.fireEvent('refreshed', { })
|
this.fireEvent('refreshed', { })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user