1
0
Fork 0

Slider: draw directly when starting auto update

... if the slider should be drawn. Otherwise will just keep track of
position to draw later.
master
thyttan 2023-09-16 18:51:39 +02:00
parent d157f51b50
commit 94074304dc
1 changed files with 5 additions and 1 deletions

View File

@ -155,7 +155,11 @@ if (o.c.autoProgress) {
cb("auto");
if (o.v.level==o.c.steps) {o.f.stopAutoUpdate();}
};
o.f.startAutoUpdate = ()=>{o.f.stopAutoUpdate(); o.v.autoIntervalID = setInterval(o.f.autoUpdate,1000);};
o.f.startAutoUpdate = ()=>{
o.f.stopAutoUpdate();
if (o.v.shouldAutoDraw) o.f.draw(o.v.level);
o.v.autoIntervalID = setInterval(o.f.autoUpdate,1000);
};
o.f.stopAutoUpdate = ()=>{if (o.v.autoIntervalID) {clearInterval(o.v.autoIntervalID); o.v.autoIntervalID = undefined;}};
}