script: set: pass fromScript flag

This commit is contained in:
bordun 2020-04-17 14:16:29 +02:00
parent 9afb2c7b55
commit b2f1003b7d
2 changed files with 2 additions and 1 deletions

View file

@ -60,6 +60,7 @@ class ScriptVm extends Vm {
this.sandbox.contentWindow.set = (id, value)=>{
var options = this.getValueOptions()
options.fromScript = true
// if (id === options.id) options.sync = false // loop stop
// if (this.getWidget() === options.widget) options.sync = false // loop stop

View file

@ -202,7 +202,7 @@ class Slider extends Canvas {
}
if (!options.dragged || (this.percent <= 100 && this.percent > 0)) this.percent = this.valueToPercent(this.value)
if (!options.dragged || options.fromScript) this.percent = this.valueToPercent(this.value)
this.batchDraw()