switcher: update linked widgets' osc properties before sending if they depend on the switcher's value (#344)

This commit is contained in:
jean-emmanuel 2018-08-01 18:35:31 +02:00
parent d0c539b283
commit 85aa861fd2
2 changed files with 8 additions and 2 deletions

View file

@ -83,6 +83,11 @@ module.exports = class _switchers_base extends Widget {
applyState(state, options) {
// extra sync routine to ensure linked widgets' props update before osc is sent
if (options.sync) this.changed({...options, send:false, sync:false})
//
for (var id in state) {
var value = state[id],
widgets = widgetManager.getWidgetById(id)