mirror of https://github.com/espruino/BangleApps
[] skyspy: fix button handling.
parent
ab0b4cbb45
commit
a64efa4d1f
|
@ -320,9 +320,16 @@ function onSwipe(dir) {
|
||||||
nextScreen();
|
nextScreen();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var last_b = 0;
|
||||||
function touchHandler(d) {
|
function touchHandler(d) {
|
||||||
let x = Math.floor(d.x);
|
let x = Math.floor(d.x);
|
||||||
let y = Math.floor(d.y);
|
let y = Math.floor(d.y);
|
||||||
|
|
||||||
|
if (d.b != 1 || last_b != 0) {
|
||||||
|
last_b = d.b;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
last_b = d.b;
|
||||||
|
|
||||||
if ((x<h/2) && (y<w/2))
|
if ((x<h/2) && (y<w/2))
|
||||||
adj_time = 1;
|
adj_time = 1;
|
||||||
|
|
Loading…
Reference in New Issue