1
0
Fork 0

ha: disable swiping on sliders and prevent swipe event propagation

master
Rob Pilling 2024-04-22 08:38:58 +01:00
parent 13997ca678
commit cce28d9675
1 changed files with 3 additions and 0 deletions

View File

@ -147,11 +147,14 @@ Bangle.on('touch', (btn, e) => {
});
Bangle.on("swipe", (lr,ud) => {
if (slider) return; // "disable" swiping on sliders
if (lr == -1) {
toLeft();
} else if (lr == 1) {
toRight();
}
E.stopEventPropagation && E.stopEventPropagation();
});