state widget: bypass inner buttons useless behaviors
This commit is contained in:
parent
2cf4b40735
commit
3cff426ceb
1 changed files with 4 additions and 0 deletions
|
|
@ -50,6 +50,8 @@ class State extends Widget {
|
|||
this.saveButton.container.classList.add('not-editable', 'value')
|
||||
this.loadButton.container.classList.add('not-editable', 'value', 'disabled')
|
||||
|
||||
this.saveButton.sendValue = this.loadButton.sendValue = ()=>{}
|
||||
|
||||
this.widget.appendChild(this.saveButton.container)
|
||||
this.widget.appendChild(this.loadButton.container)
|
||||
|
||||
|
|
@ -58,6 +60,8 @@ class State extends Widget {
|
|||
var {widget} = e
|
||||
if (widget === this) return
|
||||
|
||||
e.stopPropagation = true
|
||||
|
||||
if (widget.active) this.setValue(widget === this.saveButton ? 'save' : 'load', {sync: true, send: true})
|
||||
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue