From 327d461aab61b5c4f4380d10bc726f56a24b1f76 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Thu, 27 Oct 2022 09:54:05 +0200 Subject: [PATCH] multixy: allow setting its own value from onValue script while touched --- CHANGELOG.md | 1 + src/client/widgets/pads/multixy.js | 7 ++++++- src/client/widgets/scripts/script-vm.js | 6 ++++-- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7c7f1526..51f8365b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ - widgets - add folder widget (flat container that doesn't affect layout) - input: add `maxLength` property + - multixy: allow setting its own value from onValue script while touched - ui - add a virtual onscreen keyboard for desktop clients (can be enabled from the clients main menu) diff --git a/src/client/widgets/pads/multixy.js b/src/client/widgets/pads/multixy.js index b9184c0b..b3ea3347 100644 --- a/src/client/widgets/pads/multixy.js +++ b/src/client/widgets/pads/multixy.js @@ -293,7 +293,12 @@ module.exports = class MultiXy extends Pad { setValue(v, options={}) { if (!v || !v.length || v.length!=this.npoints * 2) return - if (this.touched && !options.dragged && !options.doubleTap) return this.setValueTouchedQueue = [v, options] + if ( + this.touched && + !options.dragged && + !options.doubleTap && + options.fromScript !== this + ) return this.setValueTouchedQueue = [v, options] for (let i=0;i key.match(new RegExp('^' + id.replace(/\*/g, '.*') + '$'))) ).filter(w => w !== widget)