mirror of https://github.com/espruino/BangleApps
Slider: add level to auto callback
parent
bbb2907a54
commit
ee5e08d8fe
|
@ -184,7 +184,7 @@ try { // For making it possiblie to run the test app in the following catch stat
|
|||
o.f.autoUpdate = ()=>{
|
||||
o.v.level = o.v.autoInitLevel + Math.round((Date.now()-o.v.autoInitTime)/1000)
|
||||
if (o.v.level>o.c.steps) o.v.level=o.c.steps;
|
||||
cb("auto");
|
||||
cb("auto", o.v.level);
|
||||
o.f.draw&&o.f.draw(o.v.level);
|
||||
if (o.v.level==o.c.steps) {o.f.stopAutoUpdate();}
|
||||
};
|
||||
|
|
|
@ -20,7 +20,7 @@ Bangle.on("drag", slider.f.dragSlider);
|
|||
- `"map", o.v.level` | current level when interacting by mapping interface.
|
||||
- `"incr", incr` | where `incr` == +/-1, when interacting by incrementing interface.
|
||||
- `"remove", o.v.level` | last level when the slider times out.
|
||||
- `"auto"` | on its own, when auto progressing.
|
||||
- `"auto", o.v.level` | when auto progressing.
|
||||
|
||||
`configObject` (`conf`) (second argument, optional) has the following defaults:
|
||||
|
||||
|
|
Loading…
Reference in New Issue