From 15904133f3ab65099601eec23119df72a5a391dc Mon Sep 17 00:00:00 2001 From: bordun Date: Mon, 6 Apr 2020 14:46:08 +0200 Subject: [PATCH] script: fix script prop doc --- src/client/widgets/common/widget.js | 2 +- src/client/widgets/scripts/script.js | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/client/widgets/common/widget.js b/src/client/widgets/common/widget.js index afa78142..9050e100 100644 --- a/src/client/widgets/common/widget.js +++ b/src/client/widgets/common/widget.js @@ -99,7 +99,7 @@ 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 receives the defined event. See documentation.'}, + script: {type: 'script', value: '', help: 'Script executed whenever the widget\'s value updates. See documentation.'}, _osc: 'osc', diff --git a/src/client/widgets/scripts/script.js b/src/client/widgets/scripts/script.js index 9ce9d159..69dea213 100644 --- a/src/client/widgets/scripts/script.js +++ b/src/client/widgets/scripts/script.js @@ -19,7 +19,7 @@ class Script extends Widget { _script: 'script', event: {type: 'string', value: 'value', choices: ['value', 'keyboard'], 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.'}, + script: {}, _eventKey: 'event: keyboard', @@ -35,7 +35,9 @@ class Script extends Widget { '_geometry', 'left', 'top', 'width', 'height', 'expand', '_style', 'colorText', 'colorWidget', 'colorFill', 'colorStroke', 'alphaStroke', 'alphaFillOn', 'alphaFillOff', 'padding', 'css' - ]) + ], { + script: {type: 'script', value: '', help: 'Script executed whenever the widget\'s receives the defined event. See documentation.'}, + }) }