Skip to content

Commit e36a35e

Browse files
committed
chore(Scroller): lint baked-in dependency
1 parent 0cbc19b commit e36a35e

File tree

3 files changed

+267
-273
lines changed

3 files changed

+267
-273
lines changed
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
export function currentAnimationTimeMillis() {
2-
return Date.now();
2+
return Date.now();
33
}

src/libraries/Scroller/ViscousFluidInterpolator.js

+17-17
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,26 @@ const VISCOUS_FLUID_SCALE = 8;
44
const VISCOUS_FLUID_NORMALIZE = 1 / viscousFluid(1);
55
const VISCOUS_FLUID_OFFSET = 1 - VISCOUS_FLUID_NORMALIZE * viscousFluid(1);
66

7-
function viscousFluid(x) {
8-
x *= VISCOUS_FLUID_SCALE;
9-
if (x < 1) {
10-
x -= (1 - Math.exp(-x));
11-
} else {
12-
var start = 0.36787944117; // 1/e == exp(-1)
13-
x = 1 - Math.exp(1 - x);
14-
x = start + x * (1 - start);
15-
}
16-
return x;
7+
function viscousFluid (x) {
8+
x *= VISCOUS_FLUID_SCALE;
9+
if (x < 1) {
10+
x -= (1 - Math.exp(-x));
11+
} else {
12+
var start = 0.36787944117; // 1/e == exp(-1)
13+
x = 1 - Math.exp(1 - x);
14+
x = start + x * (1 - start);
15+
}
16+
return x;
1717
}
1818

1919
const ViscousFluidInterpolator = {
20-
getInterpolation: function(input) {
21-
var interpolated = VISCOUS_FLUID_NORMALIZE * viscousFluid(input);
22-
if(interpolated > 0) {
23-
return interpolated + VISCOUS_FLUID_OFFSET;
20+
getInterpolation: function (input) {
21+
var interpolated = VISCOUS_FLUID_NORMALIZE * viscousFluid(input);
22+
if (interpolated > 0) {
23+
return interpolated + VISCOUS_FLUID_OFFSET;
24+
}
25+
return interpolated;
2426
}
25-
return interpolated;
26-
}
27-
}
27+
};
2828

2929
export default ViscousFluidInterpolator;

0 commit comments

Comments
 (0)