inspector: move script property to scripting category
This commit is contained in:
parent
1a7b824e73
commit
6bac6ea39f
4 changed files with 10 additions and 7 deletions
|
|
@ -106,7 +106,6 @@ class Widget extends EventEmitter {
|
|||
'When prefixed with >>, the `linkId` will make the widget act as a master (sending but not receiving)',
|
||||
'When prefixed with <<, the `linkId` will make the widget act as a slave (receiving but not sending)'
|
||||
]},
|
||||
script: {type: 'script', value: '', help: ['Script executed whenever the widget\'s value updates. See <a href="https://openstagecontrol.ammd.net/docs/widgets/scripting/">documentation</a>.']},
|
||||
},
|
||||
osc: {
|
||||
address: {type: 'string', value: 'auto', help: [
|
||||
|
|
@ -133,6 +132,9 @@ class Widget extends EventEmitter {
|
|||
]},
|
||||
ignoreDefaults: {type: 'boolean', value: false, help: 'Set to `true` to ignore the server\'s default targets'},
|
||||
bypass: {type: 'boolean', value: false, help: 'Set to `true` to prevent the widget from sending any osc message'}
|
||||
},
|
||||
scripting: {
|
||||
script: {type: 'script', value: '', help: ['Script executed whenever the widget\'s value updates. See <a href="https://openstagecontrol.ammd.net/docs/widgets/scripting/">documentation</a>.']},
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -21,18 +21,16 @@ class Script extends Widget {
|
|||
},
|
||||
geometry: null,
|
||||
style: null,
|
||||
class_specific: {
|
||||
scripting: {
|
||||
event: {type: 'string', value: 'value', choices: ['value', 'keyboard', 'once'], help: 'Define which events trigger the script\'s execution.'},
|
||||
script: {type: 'script', value: '', help: 'Script executed whenever the widget\'s receives the defined event. See <a href="https://openstagecontrol.ammd.net/docs/widgets/scripting/">documentation</a>.'},
|
||||
|
||||
_separator: 'event: keyboard',
|
||||
|
||||
keyBinding: {type: 'string|array', value: '', help: 'Key combo `string` or `array` of strings (see <a href="https://github.com/RobertWHurst/KeyboardJS">KeyboardJS</a> documentation)'},
|
||||
keyRepeat: {type: 'boolean', value: true, help: 'Set to `false` to prevent keydown repeats when holding the key combo pressed'},
|
||||
keyType: {type: 'string', value: 'keydown', choices: ['keydown', 'keyup', 'both'], help: 'Determines which key event trigger the script\'s execution'},
|
||||
},
|
||||
value: {
|
||||
script: null
|
||||
|
||||
script: {type: 'script', value: '', help: 'Script executed whenever the widget\'s receives the defined event. See <a href="https://openstagecontrol.ammd.net/docs/widgets/scripting/">documentation</a>.'},
|
||||
}
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ module.exports = class Encoder extends StaticProperties(Knob, {angle: 360, range
|
|||
}
|
||||
})
|
||||
|
||||
defaults.value.script.help.push(
|
||||
defaults.scripting.script.help.push(
|
||||
'Additionnal variables:',
|
||||
'- `locals.speed`: encoder\'s speed (reduce `sensitivity to increase averaging`)'
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue