File tree Expand file tree Collapse file tree 4 files changed +6
-12
lines changed
packages/react-native-gesture-handler/src/v3/hooks/gestures Expand file tree Collapse file tree 4 files changed +6
-12
lines changed Original file line number Diff line number Diff line change @@ -46,8 +46,8 @@ function diffCalculator(
46
46
) {
47
47
'worklet' ;
48
48
return {
49
- changeX : previous ? current . x - previous . x : current . x ,
50
- changeY : previous ? current . y - previous . y : current . y ,
49
+ changeX : previous ? current . x - previous . x : 0 ,
50
+ changeY : previous ? current . y - previous . y : 0 ,
51
51
} ;
52
52
}
53
53
Original file line number Diff line number Diff line change @@ -245,12 +245,8 @@ function diffCalculator(
245
245
) {
246
246
'worklet' ;
247
247
return {
248
- changeX : previous
249
- ? current . translationX - previous . translationX
250
- : current . translationX ,
251
- changeY : previous
252
- ? current . translationY - previous . translationY
253
- : current . translationY ,
248
+ changeX : previous ? current . translationX - previous . translationX : 0 ,
249
+ changeY : previous ? current . translationY - previous . translationY : 0 ,
254
250
} ;
255
251
}
256
252
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ function diffCalculator(
31
31
) {
32
32
'worklet' ;
33
33
return {
34
- scaleChange : previous ? current . scale / previous . scale : current . scale ,
34
+ scaleChange : previous ? current . scale / previous . scale : 0 ,
35
35
} ;
36
36
}
37
37
Original file line number Diff line number Diff line change @@ -31,9 +31,7 @@ function diffCalculator(
31
31
) {
32
32
'worklet' ;
33
33
return {
34
- rotationChange : previous
35
- ? current . rotation - previous . rotation
36
- : current . rotation ,
34
+ rotationChange : previous ? current . rotation - previous . rotation : 0 ,
37
35
} ;
38
36
}
39
37
You can’t perform that action at this time.
0 commit comments