Update app.js
Fix onTouch while timerRunning. Previously briefly showed timer picker numbers.master
parent
0a93ea7c00
commit
fd5e0bf45c
|
|
@ -50,20 +50,24 @@ function onTouch(button, xy) {
|
||||||
var touchMidpoint = timePickerLayout.hours.y + timePickerLayout.hours.h/2;
|
var touchMidpoint = timePickerLayout.hours.y + timePickerLayout.hours.h/2;
|
||||||
var diff = 0;
|
var diff = 0;
|
||||||
Bangle.buzz(40, 0.3);
|
Bangle.buzz(40, 0.3);
|
||||||
if (!timerRunning() && xy.y > 24 && xy.y < touchMidpoint - 10) {
|
if (xy.y > timePickerLayout.btnStart.y) {
|
||||||
diff = 1;
|
|
||||||
} else if (!timerRunning() && xy.y > touchMidpoint + 10 && xy.y < timePickerLayout.btnStart.y) {
|
|
||||||
diff = -1;
|
|
||||||
} else if (xy.y > timePickerLayout.btnStart.y) {
|
|
||||||
onButton();
|
onButton();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (xy.x < timePickerLayout.hours.w) {
|
if (!timerRunning()) {
|
||||||
diff *= 3600;
|
if (&& xy.y > 24 && xy.y < touchMidpoint - 10) {
|
||||||
} else if (xy.x > timePickerLayout.mins.x && xy.x < timePickerLayout.secs.x) {
|
diff = 1;
|
||||||
diff *= 60;
|
} else if (&& xy.y > touchMidpoint + 10 && xy.y < timePickerLayout.btnStart.y) {
|
||||||
|
diff = -1;
|
||||||
|
}
|
||||||
|
if (xy.x < timePickerLayout.hours.w) {
|
||||||
|
diff *= 3600;
|
||||||
|
} else if (xy.x > timePickerLayout.mins.x && xy.x < timePickerLayout.secs.x) {
|
||||||
|
diff *= 60;
|
||||||
|
}
|
||||||
|
updateTimePicker(diff);
|
||||||
}
|
}
|
||||||
updateTimePicker(diff);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function onButton() {
|
function onButton() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue