Commit
+2 -2 +/-1 browse
1 | diff --git a/docsite/js/slider.js b/docsite/js/slider.js |
2 | index defb04e..837ab40 100644 |
3 | --- a/docsite/js/slider.js |
4 | +++ b/docsite/js/slider.js |
5 | @@ -5,9 +5,9 @@ const rangeToPercent = slider => { |
6 | let val = slider.value |
7 | let max = slider.max |
8 | |
9 | - if (slider.min === '-1' && (val === "-1" || val === "0")) |
10 | + if (slider.min === '-1' && (val === '-1' || val === '0')) |
11 | percent = (val+1) / max * 100 |
12 | - else if (slider.min === '-1' && val === "1") |
13 | + else if (slider.min === '-1' && val === '1') |
14 | percent = val / (max-2) * 100 |
15 | else |
16 | percent = val / max * 100 |