diff --git a/CHANGELOG.md b/CHANGELOG.md index f1aad18f..eb620566 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ - bug fixes - modal: display issue when a modal receives the same value mutliple times +- widgets + - patchbay: trigger `onValue` script when a connection changes + - misc - windows: allow accessing other drives than the default one (list drives when the file browser reaches the filesystem's root) diff --git a/package.json b/package.json index ac17bf17..3139f1fb 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "open-stage-control", "productName": "Open Stage Control", "description": "Libre and modular OSC / MIDI controller", - "version": "1.16.3", + "version": "1.16.4", "author": { "name": "Jean-Emmanuel Doucet", "email": "jean-emmanuel@ammd.net" diff --git a/src/client/widgets/containers/patchbay.js b/src/client/widgets/containers/patchbay.js index e5519a2e..931591b3 100644 --- a/src/client/widgets/containers/patchbay.js +++ b/src/client/widgets/containers/patchbay.js @@ -133,6 +133,7 @@ class PatchBay extends Container(Canvas) { this.inputNodes = [] this.outputNodes = [] + this.value = {} for (let k in this.inputs) { let w = parser.parse({ @@ -144,7 +145,6 @@ class PatchBay extends Container(Canvas) { preArgs: this.inputs[k], bypass: '@{parent.bypass}', label: k - }, parentNode: DOM.get(this.widget, '.inputs')[0], parent: this @@ -153,6 +153,7 @@ class PatchBay extends Container(Canvas) { w._not_editable = true this.inputsWidgets.push(w) this.inputNodes.push(w.container) + this.value[k] = [] } var outputs = DOM.get(this.widget, '.outputs')[0] @@ -196,6 +197,17 @@ class PatchBay extends Container(Canvas) { }, {element: this.widget}) + this.on('value-changed',(e)=>{ + + if (e.widget === this || e.widget.parent !== this) return + + var k = e.widget.getProp('label') + this.value[k] = e.widget.getValue() + + this.changed(e.options) + + }) + } toggleConnection(node) {