button: decoupled push mode returning wrong value when activated from a widget script
This commit is contained in:
parent
6cbddbd2b6
commit
bf97ebceb5
2 changed files with 8 additions and 0 deletions
|
|
@ -279,6 +279,13 @@ class Button extends Widget {
|
|||
if (options.fromExternal) {
|
||||
this.state = newstate
|
||||
this.decoupledValue.setValue(newstate, {sync: true})
|
||||
} else if (!options.local && this.getProp('mode') === 'push') {
|
||||
if (newstate === 1 && !this.touchActive) {
|
||||
this.touchActive = 1
|
||||
setTimeout(()=>{this.touchActive = 0})
|
||||
} else {
|
||||
this.touchActive = 0
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue