Skip to content

Commit 1892256

Browse files
committed
Removed dead code
1 parent 342dc40 commit 1892256

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

converters.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export function valueToPosition(value, valuesArray, sliderLength) {
4444
const arrLength = valuesArray.length - 1;
4545
const validIndex = index === -1 ? arrLength : index;
4646

47-
return sliderLength * validIndex / arrLength;
47+
return (sliderLength * validIndex) / arrLength;
4848
}
4949

5050
export function positionToValue(position, valuesArray, sliderLength) {
@@ -55,7 +55,7 @@ export function positionToValue(position, valuesArray, sliderLength) {
5555
return null;
5656
} else {
5757
arrLength = valuesArray.length - 1;
58-
index = arrLength * position / sliderLength;
58+
index = (arrLength * position) / sliderLength;
5959
return valuesArray[Math.round(index)];
6060
}
6161
}
@@ -66,7 +66,6 @@ export function createArray(start, end, step) {
6666
var direction = start - end > 0 ? -1 : 1;
6767
var result = [];
6868
if (!step) {
69-
//console.log('invalid step: ', step);
7069
return result;
7170
} else {
7271
length = Math.abs((start - end) / step) + 1;

0 commit comments

Comments
 (0)