-
Notifications
You must be signed in to change notification settings - Fork 74
feat: Web compatibility #98
New issue
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
base: main
Are you sure you want to change the base?
Conversation
markstreich
commented
Mar 25, 2025
- fixes Web compatibility #93
| "react-native-reanimated": "^3.2.0", | ||
| "release-it": "^14.2.2", | ||
| "typescript": "^4.1.3" | ||
| "typescript": "^4.9.5" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
main was failing for yarn typescript with the old version
| 'worklet'; | ||
| if (!isActive.value) return; | ||
| if (numberOfPointers !== 1) return; | ||
| if (numberOfPointers > 1) return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On web (with mouse), numberOfPointers is 0 (if I understand correctly, this was preventing two finger touches from triggering double clicks, so > 1 should have the same effect)
| const { height: h, width: w } = e.nativeEvent.source; | ||
| setImageDimensions({ height: h, width: w }); | ||
| onLoad={() => { | ||
| Image.getSize( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nativeEvent.source doesn't work on web.
| setImageDimensions, | ||
| }: RenderItemInfo<{ uri: string }>) => { | ||
| return ( | ||
| <Image |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
expo-image (at least this version) gives a bunch of errors on web, also the error in the main library was from defaultRenderImage, so switched to using that in the example