mirror of
https://github.com/mehotkhan/BandersnatchInteractive.git
synced 2025-07-28 09:42:55 +00:00
assets/scripts.js: Make choice timer bar animation smoother
It's still not smooth due to the ontimeupdate rate limit, but at least it's less choppy (moves at a consistent speed).
This commit is contained in:
parent
39c3144e4c
commit
d5b63699fe
1 changed files with 1 additions and 1 deletions
|
@ -196,7 +196,7 @@ function momentStart(m, seeked) {
|
||||||
function momentUpdate(m, ms) {
|
function momentUpdate(m, ms) {
|
||||||
//console.log('momentUpdate', m);
|
//console.log('momentUpdate', m);
|
||||||
if (m.choices) {
|
if (m.choices) {
|
||||||
var p = 100 - Math.floor((ms - m.startMs) * 100 / (m.endMs - m.startMs));
|
var p = 100 - ((ms - m.startMs) * 100.0 / (m.endMs - m.startMs));
|
||||||
document.getElementById("progress").style.width = p + '%';
|
document.getElementById("progress").style.width = p + '%';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue