Merge branch 'master' into v1

This commit is contained in:
bordun 2020-03-05 22:35:33 +01:00
commit 9744fe422b
5 changed files with 15 additions and 6 deletions

View file

@ -49,7 +49,7 @@ var Osc = class Osc extends EventEmitter {
if (data._rawTarget) {
// if the message target is provided (when message comes from another client connected to the same server)
// then we only update the widgets that have the exact same target
match = deepEqual(widgetTarget, data.target)
match = deepEqual(widgetTarget, data._rawTarget)
} else if (data.host === 'midi') {
// if the message comes from a midi port, only update widgets that send to that port
let widgetArrayTarget = Array.isArray(widgetTarget) ? widgetTarget : [widgetTarget],

View file

@ -187,9 +187,9 @@ module.exports = class Rgb extends Widget {
}
var hsb = rgbToHsb({
r: value[0],
g: value[1],
b: value[2]
r: mapToScale(value[0], [this.getProp('range').min, this.getProp('range').max], [0, 255], false),
g: mapToScale(value[1], [this.getProp('range').min, this.getProp('range').max], [0, 255], false),
b: mapToScale(value[2], [this.getProp('range').min, this.getProp('range').max], [0, 255], false)
})
if (!options.dragged) {