ctrlpad: regenerate js

pull/3383/head
Rob Pilling 2024-04-27 10:00:47 +01:00
parent c9adcf8d79
commit 2013398744
1 changed files with 16 additions and 3 deletions

View File

@ -194,8 +194,20 @@
ui === null || ui === void 0 ? void 0 : ui.overlay.hide(); ui === null || ui === void 0 ? void 0 : ui.overlay.hide();
ui = undefined; 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 onDrag = (function (e) {
var _a, _b; var _a, _b, _c;
var dragDistance = 30; var dragDistance = 30;
if (e.b === 0) if (e.b === 0)
touchDown = startedUpDrag = false; touchDown = startedUpDrag = false;
@ -209,6 +221,7 @@
if (e.y <= 40) { if (e.y <= 40) {
state = 1; state = 1;
startY = e.y; startY = e.y;
(_a = E.stopEventPropagation) === null || _a === void 0 ? void 0 : _a.call(E);
} }
else { else {
state = 2; state = 2;
@ -235,10 +248,10 @@
initUI(); initUI();
ui.overlay.setBottom(e.y - dragOffset); 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; break;
case 3: 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 (e.b) {
if (!touchDown) { if (!touchDown) {
startY = e.y; startY = e.y;