From 95f7640cf3b4b7272cc96c6ed9cdf34acec9b6b1 Mon Sep 17 00:00:00 2001 From: bordun Date: Fri, 25 Jan 2019 10:40:54 +0100 Subject: [PATCH] fader: builtin meter's address/color/preArgs should be dynamic (#458) --- CHANGELOG.md | 3 ++- src/client/app/widgets/sliders/fader.js | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dbf24dec..e9a81dd2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,8 @@ ## 0.41.4 - bug fixes - - broken `--remote-saving` option + - broken `--remote-saving` option* + - `fader`: built-in `meter` not updating its `address`, `preArgs` & `color` properties ## 0.41.3 diff --git a/src/client/app/widgets/sliders/fader.js b/src/client/app/widgets/sliders/fader.js index 575b8d0a..d41464c1 100644 --- a/src/client/app/widgets/sliders/fader.js +++ b/src/client/app/widgets/sliders/fader.js @@ -18,7 +18,7 @@ module.exports = class Fader extends Slider { meter: {type: 'boolean', value: false, help: [ 'Set to true to display a vu-meter next in the fader', '- the meter\'s `id` will be the same as the widget\'s with `/meter` appended to it', - '- the meter\'s `id` will be the same as the widget\'s with `/meter` appended to it' + '- the meter\'s `address` will be the same as the widget\'s with `/meter` appended to it' ]}, compact: {type: 'boolean', value: false, help: 'Set to `true` to display a compact alternative for the widget. Disables default mouse/touch focusing on the value display.'}, dashed: {type: 'boolean', value: false, help: 'Set to `true` to display a dashed gauge'}, @@ -97,9 +97,9 @@ module.exports = class Fader extends Slider { horizontal:this.getProp('horizontal'), range:this.getProp('range'), logScale:this.getProp('logScale'), - address:this.getProp('meterAddress') || this.getProp('address') + '/meter', - preArgs:this.getProp('preArgs'), - color:this.getProp('color'), + address: '#{@{parent.meterAddress} ? @{parent.meterAddress} : concat(@{parent.address}, "/meter")}', + preArgs: '@{parent.preArgs}', + color: '@{parent.color}', pips:false, dashed:true }