Slider:add param for auto progress update interval

master
thyttan 2023-10-18 00:15:04 +02:00
parent 4d6edb1292
commit 5156b8a3e5
1 changed files with 3 additions and 2 deletions

View File

@ -212,11 +212,12 @@ try { // For making it possiblie to run the test app in the following catch stat
o.v.autoInitTime=Date.now();
o.v.autoInitLevel=o.v.level;
};
o.f.startAutoUpdate = ()=>{
o.f.startAutoUpdate = (intervalSeconds)=>{
if (!intervalSeconds) intervalSeconds = 1;
o.f.stopAutoUpdate();
o.f.initAutoValues();
o.f.draw&&o.f.draw(o.v.level);
o.v.autoIntervalID = setInterval(o.f.autoUpdate,1000);
o.v.autoIntervalID = setInterval(o.f.autoUpdate,1000*intervalSeconds);
};
o.f.stopAutoUpdate = ()=>{
if (o.v.autoIntervalID) {