This commit is contained in:
STEINNI
2026-04-21 13:58:50 +00:00
2 changed files with 24 additions and 1 deletions
+1 -1
View File
@@ -254,7 +254,7 @@ bz-graflow .bzgf-nodes-container{ /* used to keep the nodes container pointer-ev
}
bz-graflow .bzgf-nodes-container > * { /* allow the nodes to be moved ! */
pointer-events: auto;
}
}
bz-graflow .bzgf-nodes-container .bzgf-node{ position:absolute; }
bz-graflow .bzgf-nodes-container .bzgf-fake-node{
+23
View File
@@ -98,6 +98,28 @@ class BZgraflow extends Buildoz{
else this.initFlow()
}
static get observedAttributes(){
return([...super.observedAttributes, 'disabled'])
}
attributeChangedCallback(name, oldValue, newValue) {
super.attributeChangedCallback(name, oldValue, newValue)
if(name == 'disabled'){
if(newValue === null) {
this.disabled = false
this.style.opacity = 1
this.style.pointerEvents = 'auto'
} else {
this.disabled = true
this.style.opacity = 0.5
this.style.pointerEvents = 'none'
}
this.querySelectorAll('.bzgf-zoom-in, .bzgf-zoom-out').forEach((btn) => {
btn.disabled = this.disabled
})
}
}
error(msg, err){
this.querySelector('.graflow-error')?.remove()
const errorEl = document.createElement('div')
@@ -227,6 +249,7 @@ class BZgraflow extends Buildoz{
}
enterSubflow(id){
if(this.disabled || this.hasAttribute('disabled')) return
const nodeEl = this.stagedNodes[id]
if(!nodeEl) return