Return isPencil prop on touch
Issues
- #460
- #735
To Do
- [x] RN Updates to add isPencil to touch props to satisfy TypeScript
- [ ] Android Support
- [ ] Web Support
Using With a simple setup like the one found with the Touch Events example, it can be used like:
const touchHandler = useTouchHandler({
onActive: ({ x, y, isPencil }) => {
...
},
});
P.S., This is my first ever open source PR so I appreciate y'alls patience.
could you add a web implementation for this? https://github.com/Shopify/react-native-skia/blob/main/package/src/views/SkiaView.web.tsx#L145
Hi @mzruiz !! Thanks so much for the PR and also congrats with the first PR to a public project :)
Since you're not done with the PR (looks like there are some outstanding issues like Android / Web) I converted the PR too a draft, and then we can discuss the issues together here even though the PR is not yet done.
@mzruiz thanks for the PR! I created #735 . Can you please use a more "generic" name like toolType field instead of isPencil to support other touch devices in the future like "Eraser"?