encoder: fix linkId
This commit is contained in:
parent
d9b1342e1d
commit
a6a4941999
4 changed files with 14 additions and 5 deletions
|
|
@ -1,5 +1,10 @@
|
|||
# Changelog
|
||||
|
||||
## 1.22.1
|
||||
|
||||
- bug fixes
|
||||
- linkId not working between two encoder widgets
|
||||
|
||||
## 1.22.0
|
||||
|
||||
- bug fixes
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
"name": "open-stage-control",
|
||||
"productName": "Open Stage Control",
|
||||
"description": "Libre and modular OSC / MIDI controller",
|
||||
"version": "1.22.0",
|
||||
"version": "1.22.1",
|
||||
"author": {
|
||||
"name": "Jean-Emmanuel Doucet",
|
||||
"email": "jean-emmanuel@ammd.net"
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ class WidgetManager extends EventEmitter {
|
|||
let v = widget.getValue()
|
||||
for (let i in widgetsByLinkId) {
|
||||
if (widgetsByLinkId[i] !== widget) {
|
||||
widgetsByLinkId[i].setValue(v,{send: options.send, sync: true, script:options.script, id})
|
||||
widgetsByLinkId[i].setValue(v,{send: options.send, sync: true, script:options.script, widget, id})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -212,7 +212,7 @@ module.exports = class Encoder extends StaticProperties(Knob, {angle: 360, range
|
|||
this.percent = 50
|
||||
this.previousPercent = 50
|
||||
} else if (
|
||||
!options.dragged ||
|
||||
!options.dragged &&
|
||||
(v !== this.getProp('forth') && v !== this.getProp('back') && (this.getProp('release') === '' && v !== this.getProp('release')))
|
||||
|
||||
) return
|
||||
|
|
@ -238,9 +238,13 @@ module.exports = class Encoder extends StaticProperties(Knob, {angle: 360, range
|
|||
|
||||
if (sensitivityIgnore) return
|
||||
|
||||
if (this.speed.length) {
|
||||
if (!options.dragged && options.widget && options.widget instanceof Encoder) {
|
||||
this.percent = options.widget.percent
|
||||
}
|
||||
|
||||
if (this.speed && this.speed.length) {
|
||||
var s = this.speed.reduce((a,c)=>a+c) / this.speed.length
|
||||
this.speed= []
|
||||
this.speed = []
|
||||
this.parsersLocalScope.speed = s
|
||||
} else {
|
||||
this.parsersLocalScope.speed = 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue