Merge branch 'master' into fastdom
This commit is contained in:
commit
f4a28dbec7
18 changed files with 158 additions and 110 deletions
|
|
@ -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)=>{
|
||||
|
|
|
|||
|
|
@ -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)) {
|
||||
|
|
|
|||
|
|
@ -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}
|
||||
|
|
|
|||
|
|
@ -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}
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue