Merge branch 'master' into fastdom

This commit is contained in:
jean-emmanuel 2022-01-26 13:56:33 +01:00
commit f4a28dbec7
18 changed files with 158 additions and 110 deletions

View file

@ -64,7 +64,7 @@ class Button extends Widget {
this.pulse = null
this.buttonSize = [100, 100]
this.exposeTouchCoords = String(this.getProp('script')).includes('touchCoords')
this.exposeTouchCoords = String(this.getProp('onValue')).includes('touchCoords')
this.parsersLocalScope.touchCoords = [0.5, 0.5]
if (this.exposeTouchCoords) {
this.on('resize', (e)=>{

View file

@ -56,7 +56,9 @@ module.exports = class OscReceiver {
}
callback(args) {
callback(data) {
var {args} = data
if (!Array.isArray(args)) args = [args]
var preArgs = this.usePreArgs ? (this.parent.getProp('preArgs') || []) : []
@ -65,6 +67,7 @@ module.exports = class OscReceiver {
for (var i in preArgs) {
if (preArgs[i] !== args[i]) return
}
if (!osc.match(this.parent, data)) return
var value = args.slice(preArgs.length)
if (value.length < 2) value = value[0]
if (typeof value === 'string' && isJSONObject(value)) {

View file

@ -26,7 +26,8 @@ class Clone extends Container() {
props: {type: 'object', value: {}, editor: 'javascript', syntaxChecker: false, help: 'Cloned widget\'s properties to override'},
},
value: null,
osc: null
osc: null,
scripting: null
})
defaults.style = {css: defaults.style.css}

View file

@ -28,7 +28,8 @@ class Fragment extends Container() {
props: {type: 'object', value: {}, editor: 'javascript', syntaxChecker: false, help: 'Fragment widget\'s properties to override'},
},
value: null,
osc: null
osc: null,
scripting: null
})
defaults.style = {css: defaults.style.css}

View file

@ -402,7 +402,7 @@ class ScriptVm extends Vm {
try {
callback()
} catch(e) {
this.errorProp('script', 'setInterval', e)
widget.errorProp('script', 'setInterval', e)
}
this.setWidget()
this.setValueOptions()