mirror of
https://github.com/movie-web/native-app.git
synced 2025-09-13 18:13:25 +00:00
chore: adjust some gesture stuff
This commit is contained in:
@@ -105,8 +105,8 @@ const VideoPlayer: React.FC<VideoPlayerProps> = ({ data }) => {
|
|||||||
const panGesture = Gesture.Pan()
|
const panGesture = Gesture.Pan()
|
||||||
.onUpdate((event) => {
|
.onUpdate((event) => {
|
||||||
const divisor = 5000;
|
const divisor = 5000;
|
||||||
const dragIsNotInHeaderOrFooter = event.y < 100 || event.y > 400;
|
const dragIsInHeaderOrFooter = event.y < 100 || event.y > 400;
|
||||||
if (dragIsNotInHeaderOrFooter) return;
|
if (dragIsInHeaderOrFooter) return;
|
||||||
|
|
||||||
if (event.x > screenHalfWidth) {
|
if (event.x > screenHalfWidth) {
|
||||||
const change = -event.translationY / divisor;
|
const change = -event.translationY / divisor;
|
||||||
@@ -130,7 +130,7 @@ const VideoPlayer: React.FC<VideoPlayerProps> = ({ data }) => {
|
|||||||
runOnJS(setShowBrightnessOverlay)(false);
|
runOnJS(setShowBrightnessOverlay)(false);
|
||||||
});
|
});
|
||||||
|
|
||||||
const composedGesture = Gesture.Exclusive(
|
const composedGesture = Gesture.Race(
|
||||||
panGesture,
|
panGesture,
|
||||||
pinchGesture,
|
pinchGesture,
|
||||||
doubleTapGesture,
|
doubleTapGesture,
|
||||||
|
Reference in New Issue
Block a user