From 2013398744c1a945db6a740da4abf3f37757a79b Mon Sep 17 00:00:00 2001 From: Rob Pilling Date: Sat, 27 Apr 2024 10:00:47 +0100 Subject: [PATCH] ctrlpad: regenerate js --- apps/ctrlpad/main.js | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/apps/ctrlpad/main.js b/apps/ctrlpad/main.js index 9aa189c69..f9614168e 100644 --- a/apps/ctrlpad/main.js +++ b/apps/ctrlpad/main.js @@ -194,8 +194,20 @@ ui === null || ui === void 0 ? void 0 : ui.overlay.hide(); ui = undefined; }; + var onSwipe = function () { + var _a; + switch (state) { + case 0: + case 2: + return; + case 1: + case 3: + (_a = E.stopEventPropagation) === null || _a === void 0 ? void 0 : _a.call(E); + } + }; + Bangle.prependListener('swipe', onSwipe); var onDrag = (function (e) { - var _a, _b; + var _a, _b, _c; var dragDistance = 30; if (e.b === 0) touchDown = startedUpDrag = false; @@ -209,6 +221,7 @@ if (e.y <= 40) { state = 1; startY = e.y; + (_a = E.stopEventPropagation) === null || _a === void 0 ? void 0 : _a.call(E); } else { state = 2; @@ -235,10 +248,10 @@ initUI(); ui.overlay.setBottom(e.y - dragOffset); } - (_a = E.stopEventPropagation) === null || _a === void 0 ? void 0 : _a.call(E); + (_b = E.stopEventPropagation) === null || _b === void 0 ? void 0 : _b.call(E); break; case 3: - (_b = E.stopEventPropagation) === null || _b === void 0 ? void 0 : _b.call(E); + (_c = E.stopEventPropagation) === null || _c === void 0 ? void 0 : _c.call(E); if (e.b) { if (!touchDown) { startY = e.y;