software-mansion / react-native-gesture-handler

Declarative API exposing platform native touch and gesture system to React Native.
https://docs.swmansion.com/react-native-gesture-handler/
MIT License
6.13k stars 982 forks source link

[macOS] Fix rotation #3122

Closed m-bert closed 1 month ago

m-bert commented 1 month ago

Description

Turns out that rotation on macOS works in opposite direction comparing to other platforms. This PR fixes that behavior.

Test plan

Tested on the following code (check `rotation` value in event) ```tsx import React from 'react'; import { StyleSheet, View } from 'react-native'; import { Gesture, GestureDetector } from 'react-native-gesture-handler'; export default function EmptyExample() { const g = Gesture.Rotation().onChange(console.log); return ( ); } const styles = StyleSheet.create({ container: { flex: 1, justifyContent: 'center', alignItems: 'center', backgroundColor: '#F5FCFF', }, }); ```