mirror of https://github.com/espruino/BangleApps
ctrlpad: disable swipe while active
parent
e7bec7aeb9
commit
c9adcf8d79
|
@ -258,6 +258,19 @@
|
|||
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 dragDistance = 30;
|
||||
|
||||
|
|
Loading…
Reference in New Issue