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

(cherry picked from commit f90cced)
  • Loading branch information
yuwenmemon authored and OSBotify committed Jul 15, 2024
1 parent 920a1d8 commit c929add
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 c929add

Please sign in to comment.