mirror of https://github.com/espruino/BangleApps
ctrlpad: stop event propagation at the start of a (successful) down-drag
parent
305ab3bc6f
commit
e7bec7aeb9
|
@ -274,6 +274,7 @@
|
||||||
if(e.y <= 40){
|
if(e.y <= 40){
|
||||||
state = State.TopDrag
|
state = State.TopDrag
|
||||||
startY = e.y;
|
startY = e.y;
|
||||||
|
E.stopEventPropagation?.();
|
||||||
//console.log(" topdrag detected, starting @ " + startY);
|
//console.log(" topdrag detected, starting @ " + startY);
|
||||||
}else{
|
}else{
|
||||||
//console.log(" ignoring this drag (too low @ " + e.y + ")");
|
//console.log(" ignoring this drag (too low @ " + e.y + ")");
|
||||||
|
@ -296,7 +297,7 @@
|
||||||
}else{
|
}else{
|
||||||
//console.log("returning to idle");
|
//console.log("returning to idle");
|
||||||
terminateUI();
|
terminateUI();
|
||||||
break;
|
break; // skip stopEventPropagation
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
// partial drag, show UI feedback:
|
// partial drag, show UI feedback:
|
||||||
|
|
Loading…
Reference in New Issue