Slider: add level to auto callback

pull/2953/head
thyttan 2023-10-11 01:56:45 +02:00
parent bbb2907a54
commit ee5e08d8fe
2 changed files with 2 additions and 2 deletions

View File

@ -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();}
};

View File

@ -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: