@likashefqet/react-native-image-zoom
Version:
A performant zoomable image written in Reanimated v2+ 🚀
13 lines • 404 B
JavaScript
import { useRef } from 'react';
export const usePanGestureCount = () => {
const panGestureCount = useRef(0);
const isPanning = () => panGestureCount.current > 0;
const startPan = () => panGestureCount.current++;
const endPan = () => panGestureCount.current > 0 && panGestureCount.current--;
return {
isPanning,
startPan,
endPan
};
};
//# sourceMappingURL=usePanGestureCount.js.map