We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e7f0054 commit 0f5d597Copy full SHA for 0f5d597
1 file changed
packages/react-native-gesture-handler/src/v3/hooks/gestures/hover/useHoverGesture.ts
@@ -1,4 +1,4 @@
1
-import { HandlerData, SingleGestureName } from '../../../types';
+import { GestureEvent, HandlerData, SingleGestureName } from '../../../types';
2
import { useGesture } from '../../useGesture';
3
import {
4
useClonedAndRemappedConfig,
@@ -25,10 +25,18 @@ function diffCalculator(
25
};
26
}
27
28
+function fillInDefaultValues(event: GestureEvent<HoverExtendedHandlerData>) {
29
+ 'worklet';
30
+
31
+ event.changeX = 0;
32
+ event.changeY = 0;
33
+}
34
35
function transformHoverProps(
36
config: HoverGestureConfig & HoverGestureInternalConfig
37
) {
38
config.changeEventCalculator = getChangeEventCalculator(diffCalculator);
39
+ config.fillInDefaultValues = fillInDefaultValues;
40
41
return config;
42
0 commit comments