mirror of https://github.com/espruino/BangleApps
ha: hide slider when going from value -> trigger
and handle the 'remove' event / eventless callbackspull/3375/head
parent
611fd7aaf1
commit
13997ca678
|
@ -57,6 +57,11 @@ function draw() {
|
||||||
|
|
||||||
slider.f.draw(slider.v.level);
|
slider.f.draw(slider.v.level);
|
||||||
}else{
|
}else{
|
||||||
|
if (slider) {
|
||||||
|
slider.f.remove();
|
||||||
|
slider = undefined;
|
||||||
|
}
|
||||||
|
|
||||||
g.drawString("Home", icon.width + 20, H/5-5);
|
g.drawString("Home", icon.width + 20, H/5-5);
|
||||||
g.drawString("Assistant", icon.width + 18, H/5+24-5);
|
g.drawString("Assistant", icon.width + 18, H/5+24-5);
|
||||||
|
|
||||||
|
@ -85,6 +90,8 @@ var lastTouch;
|
||||||
function onSlide(mode, level, e) {
|
function onSlide(mode, level, e) {
|
||||||
lastTouch = Date.now();
|
lastTouch = Date.now();
|
||||||
|
|
||||||
|
if (!e) return;
|
||||||
|
|
||||||
if (e.b !== 0) {
|
if (e.b !== 0) {
|
||||||
if (lastLevel == null)
|
if (lastLevel == null)
|
||||||
lastLevel = level;
|
lastLevel = level;
|
||||||
|
|
Loading…
Reference in New Issue