ctrlpad: disable swipe while active
parent
e7bec7aeb9
commit
c9adcf8d79
|
|
@ -258,6 +258,19 @@
|
||||||
ui = undefined;
|
ui = undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const onSwipe = () => {
|
||||||
|
switch (state) {
|
||||||
|
case State.Idle:
|
||||||
|
case State.IgnoreCurrent:
|
||||||
|
return;
|
||||||
|
|
||||||
|
case State.TopDrag:
|
||||||
|
case State.Active:
|
||||||
|
E.stopEventPropagation?.();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
Bangle.prependListener('swipe', onSwipe);
|
||||||
|
|
||||||
const onDrag = (e => {
|
const onDrag = (e => {
|
||||||
const dragDistance = 30;
|
const dragDistance = 30;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue