diff --git a/CHANGELOG.md b/CHANGELOG.md
index ae3bca41..9abf2018 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,9 @@
- add `mod+d` and `mod+shift+d` for duplicating widgets
- use a temporary clipboard when duplicating widgets
+- misc
+ - inspector: move `script` property to `scripting` category
+
## 1.8.13
diff --git a/src/client/widgets/common/widget.js b/src/client/widgets/common/widget.js
index 4892c509..becd5418 100644
--- a/src/client/widgets/common/widget.js
+++ b/src/client/widgets/common/widget.js
@@ -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 documentation.']},
},
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 documentation.']},
}
}
diff --git a/src/client/widgets/scripts/script.js b/src/client/widgets/scripts/script.js
index 922526e3..d60b131c 100644
--- a/src/client/widgets/scripts/script.js
+++ b/src/client/widgets/scripts/script.js
@@ -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 documentation.'},
_separator: 'event: keyboard',
keyBinding: {type: 'string|array', value: '', help: 'Key combo `string` or `array` of strings (see KeyboardJS 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 documentation.'},
}
})
diff --git a/src/client/widgets/sliders/encoder.js b/src/client/widgets/sliders/encoder.js
index 9d091f9f..102b3ed2 100644
--- a/src/client/widgets/sliders/encoder.js
+++ b/src/client/widgets/sliders/encoder.js
@@ -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`)'
)