File tree 2 files changed +8
-10
lines changed
ts-default/Components/PixelCard
ts-tailwind/Components/PixelCard
2 files changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -102,18 +102,17 @@ class Pixel {
102
102
}
103
103
}
104
104
105
- function getEffectiveSpeed ( value : any , reducedMotion : any ) {
105
+ function getEffectiveSpeed ( value : number , reducedMotion : boolean ) {
106
106
const min = 0 ;
107
107
const max = 100 ;
108
108
const throttle = 0.001 ;
109
- const parsed = parseInt ( value , 10 ) ;
110
109
111
- if ( parsed <= min || reducedMotion ) {
110
+ if ( value <= min || reducedMotion ) {
112
111
return min ;
113
- } else if ( parsed >= max ) {
112
+ } else if ( value >= max ) {
114
113
return max * throttle ;
115
114
} else {
116
- return parsed * throttle ;
115
+ return value * throttle ;
117
116
}
118
117
}
119
118
Original file line number Diff line number Diff line change @@ -101,18 +101,17 @@ class Pixel {
101
101
}
102
102
}
103
103
104
- function getEffectiveSpeed ( value : any , reducedMotion : any ) {
104
+ function getEffectiveSpeed ( value : number , reducedMotion : boolean ) {
105
105
const min = 0 ;
106
106
const max = 100 ;
107
107
const throttle = 0.001 ;
108
- const parsed = parseInt ( value , 10 ) ;
109
108
110
- if ( parsed <= min || reducedMotion ) {
109
+ if ( value <= min || reducedMotion ) {
111
110
return min ;
112
- } else if ( parsed >= max ) {
111
+ } else if ( value >= max ) {
113
112
return max * throttle ;
114
113
} else {
115
- return parsed * throttle ;
114
+ return value * throttle ;
116
115
}
117
116
}
118
117
You can’t perform that action at this time.
0 commit comments