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);
|
||||
}else{
|
||||
if (slider) {
|
||||
slider.f.remove();
|
||||
slider = undefined;
|
||||
}
|
||||
|
||||
g.drawString("Home", icon.width + 20, H/5-5);
|
||||
g.drawString("Assistant", icon.width + 18, H/5+24-5);
|
||||
|
||||
|
@ -85,6 +90,8 @@ var lastTouch;
|
|||
function onSlide(mode, level, e) {
|
||||
lastTouch = Date.now();
|
||||
|
||||
if (!e) return;
|
||||
|
||||
if (e.b !== 0) {
|
||||
if (lastLevel == null)
|
||||
lastLevel = level;
|
||||
|
|
Loading…
Reference in New Issue