value events: remove some useless flags

This commit is contained in:
jean-emmanuel 2025-12-29 10:54:56 +01:00
parent 93d3b159ca
commit c3002b99c3
2 changed files with 4 additions and 4 deletions

View file

@ -65,7 +65,7 @@ var StateManager = class StateManager {
if (widgets[j].setValue && !widgets[j].noValueState) {
widgets[j].setValue(value, {send:send, sync:true, fromState:true})
widgets[j].setValue(value, {send:send, sync:true})
}
@ -226,7 +226,7 @@ var StateManager = class StateManager {
if (this.valueStateQueue[id] !== undefined) {
for (let w of widgetManager.getWidgetById(id)) {
if (w.noValueState) continue
w.setValue(this.valueStateQueue[id], {sync: true, fromState:true, fromEdit: true})
w.setValue(this.valueStateQueue[id], {sync: true, script: false})
}
}
}
@ -235,7 +235,7 @@ var StateManager = class StateManager {
if (this.valueNewPropQueue[id] != this.valueOldPropQueue[id]) {
for (let w of widgetManager.getWidgetById(id)) {
if (w.noValueState) continue
w.setValue(w.getProp('value'), {sync: true, fromState:true})
w.setValue(w.getProp('value'), {sync: true})
}
}
}

View file

@ -241,7 +241,7 @@ class Widget extends EventEmitter {
context: {value: 0, id: '', touch: undefined}
})
this.on('value-changed', (e)=>{
if (e.widget === this && this.mounted && !e.options.fromEdit && e.options.script !== false) {
if (e.widget === this && this.mounted && e.options.script !== false) {
this.scripts.onValue.run({
value: e.options.widget ? e.options.widget.value : this.value,
id: e.options.id || e.id