We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello, can anyone create PR with this changes?
https://github.com/pavelbabenko/react-native-awesome-gallery/blob/main/src/index.tsx?plain=1#L236
const resetValues = (animated = true) => { 'worklet'; scale.value = animated ? withTiming(1) : 1; offset.x.value = animated ? withTiming(0) : 0; offset.y.value = animated ? withTiming(0) : 0; translation.x.value = animated ? withTiming(0) : 0; translation.y.value = animated ? withTiming(0) : 0; };
const resetValues = (animated = true) => { 'worklet'; const resetProperty = (prop, target) => { if (prop.value !== target) prop.value = animated ? withTiming(target) : target; }; resetProperty(scale, 1); resetProperty(offset.x, 0); resetProperty(offset.y, 0); resetProperty(translation.x, 0); resetProperty(translation.y, 0); };
Original code has problem this performance (update every image even if they are already set to their target values)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hello, can anyone create PR with this changes?
https://github.com/pavelbabenko/react-native-awesome-gallery/blob/main/src/index.tsx?plain=1#L236
Original
Modified
Original code has problem this performance (update every image even if they are already set to their target values)
The text was updated successfully, but these errors were encountered: