Skip to content

Commit

Permalink
Improve video controls ticks number selection
Browse files Browse the repository at this point in the history
  • Loading branch information
ccrisan committed Mar 18, 2019
1 parent 5b831a0 commit 212d30b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion motioneye/static/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -988,7 +988,11 @@ function addVideoControl(name, min, max, step) {
makeCheckBox(controlInput);
}
else {
makeSlider(controlInput, min, max, /* snapMode = */ 0, /* ticks = */ null, /* ticks number = */ 3, null, null);
var ticksNumber = 3;
if (max - min <= 6) {
ticksNumber = max - min + 1;
}
makeSlider(controlInput, min, max, /* snapMode = */ 0, /* ticks = */ null, ticksNumber, null, null);
}

return controlInput;
Expand Down

0 comments on commit 212d30b

Please sign in to comment.