Compare commits
2 Commits
e4c4bb7f86
...
0adc966608
| Author | SHA1 | Date | |
|---|---|---|---|
| 0adc966608 | |||
| 733420c90d |
+8
-1
@@ -235,7 +235,7 @@ class BZgraflow extends Buildoz{
|
|||||||
const childEl = document.createElement('bz-graflow')
|
const childEl = document.createElement('bz-graflow')
|
||||||
childEl.isSubflow = true
|
childEl.isSubflow = true
|
||||||
childEl.currentOrientation = this.currentOrientation
|
childEl.currentOrientation = this.currentOrientation
|
||||||
const inheritedAttrs = ['orientation', 'gapx', 'gapy', 'tween', 'align', 'tension', 'wiretype', 'edit'] // ! Not 'isolated' !
|
const inheritedAttrs = ['orientation', 'gapx', 'gapy', 'tween', 'align', 'tension', 'wiretype', 'edit', 'autofit'] // ! Not 'isolated' !
|
||||||
for(const attrName of inheritedAttrs){
|
for(const attrName of inheritedAttrs){
|
||||||
if(this.hasAttribute(attrName)) childEl.setAttribute(attrName, this.getAttribute(attrName))
|
if(this.hasAttribute(attrName)) childEl.setAttribute(attrName, this.getAttribute(attrName))
|
||||||
}
|
}
|
||||||
@@ -473,6 +473,13 @@ class BZgraflow extends Buildoz{
|
|||||||
}
|
}
|
||||||
if(forceAutoplace) this.autoPlace(this.currentOrientation, parseInt(this.getBZAttribute('gapx')) || 80, parseInt(this.getBZAttribute('gapy')) || 80)
|
if(forceAutoplace) this.autoPlace(this.currentOrientation, parseInt(this.getBZAttribute('gapx')) || 80, parseInt(this.getBZAttribute('gapy')) || 80)
|
||||||
this.fireEvent('refreshed', { })
|
this.fireEvent('refreshed', { })
|
||||||
|
if(this.hasAttribute('autofit')){
|
||||||
|
const autofitAttr = this.getAttribute('autofit')
|
||||||
|
const autofitPercent = (autofitAttr !== null && autofitAttr !== '' && !Number.isNaN(parseFloat(autofitAttr)))
|
||||||
|
? parseFloat(autofitAttr)
|
||||||
|
: undefined
|
||||||
|
this.autofit(autofitPercent)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Convert viewport (client) coordinates to this instance's SVG local coordinates.
|
// Convert viewport (client) coordinates to this instance's SVG local coordinates.
|
||||||
|
|||||||
Reference in New Issue
Block a user