From 4612671f25fc5af905e42654fef4d27400b65425 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Sat, 29 Dec 2018 11:00:54 +0100 Subject: [PATCH] lint & update docs --- resources/docs/widgets-reference.md | 1 + src/client/app/widgets/common/osc-receiver.js | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/resources/docs/widgets-reference.md b/resources/docs/widgets-reference.md index 9fa9b58a..f1e2cb50 100644 --- a/resources/docs/widgets-reference.md +++ b/resources/docs/widgets-reference.md @@ -127,6 +127,7 @@ | property | type |default | description | | --- | --- | --- | --- | |

push

|||| +|

doubleTap

| `boolean` | false | Set to `true` to make the button require a double tap to be pushed instead of a single tap | |

on

| `*` | 1 | Set to `null` to send send no argument in the osc message

Can be an `object` if the type needs to be specified (see preArgs) | |

off

| `*` | 0 | Set to `null` to send send no argument in the osc message

Can be an `object` if the type needs to be specified (see preArgs) | |

norelease

| `boolean` | false | Set to `true` to prevent sending any osc message when releasing the button | diff --git a/src/client/app/widgets/common/osc-receiver.js b/src/client/app/widgets/common/osc-receiver.js index 9a2a2516..67dee302 100644 --- a/src/client/app/widgets/common/osc-receiver.js +++ b/src/client/app/widgets/common/osc-receiver.js @@ -4,7 +4,7 @@ module.exports = class OscReceiver { constructor(options) { - var {prefix, address, value, parent, propName} = options + var {address, value, parent, propName} = options try { this.value = JSON.parse(value) @@ -29,7 +29,7 @@ module.exports = class OscReceiver { if (address) this.address = address if (this.address[0] !== '/') { - this.prefix = this.parent.getProp('address') || this.parent.resolveProp('address', undefined, false, this) + this.prefix = this.parent.getProp('address') || this.parent.resolveProp('address', undefined, false, this) if (this.prefix[this.prefix.length - 1] !== '/') this.prefix += '/' }