-
Notifications
You must be signed in to change notification settings - Fork 481
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
Picture not rerendering on iOS #2732
Comments
Can you provide a standalone reproducible example? I would be happy to take a look |
Repro is available here: https://github.com/mbpictures/react-native-skia-sketch-repro |
Any updates? |
Yes thank you for the reproduction. The layout seems to not be accepted by the canvas on iOS (or at least on iOS simulator with new arch). I was able to rewrite your example to make it work perfectly. You were using lots of layout properties I'm not familar with. I will try to track down what exactly makes the layout fail on iOS. Could you do the same on your side? See if we can track down exactly which property "fails". This is not related to the pictures, it's just that on iOS the Canvas appear to not have an ok layout (might be related to gesture handler too). |
This is how you can rewrite you example to work: <View style={[style, {pointerEvents: toolbar.activeTool === Tools.None ? 'none' : 'auto'}]}>
<View style={styles.container}>
<GestureDetector gesture={panGesture}>
<View style={styles.canvas}>
<Canvas style={{ flex: 1}}>
<Picture picture={allPicture} />
<Picture picture={currentPicture} />
</Canvas>
</View>
</GestureDetector>
</View>
</View> But still I would like to get a sense of what is going on. |
I've noticed that on iOS, removing the following: |
Thanks for the investigation! Removing |
Having the exact same issue as you, on new architecture. Initially the path will render properly, but might randomly disappear. Only fully closing and opening the app resolves the issue.
|
@mbpictures I was able to reproduce the issue in a minimal example. Hopefully we can find the root cause issue. |
🎉 This issue has been resolved in version 1.7.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Hi!
I'm creating a drawing-like component using skia and gesture handler. My code looks like this (simplified):
This works fine on Android, but on iOS the Picture doesn't rerender. I already added logs inside of the createPicture function and saw, that it is called while painting and also the value of the path looks good, so I have no idea why the picture doesn't rerender.
The text was updated successfully, but these errors were encountered: