Skip to content

Commit

Permalink
Merge pull request #45400 from QichenZhu/fix/45162
Browse files Browse the repository at this point in the history
Make ImageCropView animated style function a worklet
  • Loading branch information
yuwenmemon authored Jul 15, 2024
2 parents ed7f515 + 39404fe commit f90cced
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/AvatarCropModal/ImageCropView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ function ImageCropView({imageUri = '', containerSize = 0, panGesture = Gesture.P

// A reanimated memoized style, which updates when the image's size or scale changes.
const imageStyle = useAnimatedStyle(() => {
'worklet';

const height = originalImageHeight.value;
const width = originalImageWidth.value;
const aspectRatio = height > width ? height / width : width / height;
Expand Down

0 comments on commit f90cced

Please sign in to comment.