-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Add pointerType to event
#2760
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
Merged
Merged
Add pointerType to event
#2760
Changes from 31 commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
880b134
Basic iOS implementation
m-bert 9722fda
Add flag to Info.plist
m-bert 05fd2d3
Add PointerType enum
m-bert 5ef00c7
Add pointerType on Web
m-bert 74d76dd
Add android implementation
m-bert 16e5ccb
Fix macOS
m-bert baeac06
Add pointerType to GestureEventPayload
m-bert 2013287
Add pointerType export to index
m-bert 30c14e1
Add example
m-bert 7c44264
Fix iOS build
m-bert 5200224
Add runOnJS to example
m-bert 7bf1e55
Merge branch 'main' into @mbert/add-pointertype-to-event
m-bert aa6830d
Merge branch 'main' into @mbert/add-pointertype-to-event
m-bert 4695e7b
Fix type
m-bert 66c87ff
Change cocoapods version
m-bert bc7dcfd
Fix format in yaml
m-bert 098f194
Merge branch 'main' into @mbert/add-pointertype-to-event
m-bert 407bbbe
Remove WebPointerType interface
m-bert adbdf3c
Change setCurrentPointer name on macOS
m-bert 846cfbf
Remove imports
m-bert 711becb
Set pointerType in NativeViewGestureHandler
m-bert ad7cbc0
Merge branch 'main' into @mbert/add-pointertype-to-event
m-bert fd4fe73
Merge branch 'main' into @mbert/add-pointertype-to-event
m-bert 7e67f7b
Merge branch 'main' into @mbert/add-pointertype-to-event
m-bert ff9ad8c
Merge branch 'main' into @mbert/add-pointertype-to-event
m-bert f6b1ca5
Merge branch 'main' into @mbert/add-pointertype-to-event
m-bert 316e70b
Merge branch 'main' into @mbert/add-pointertype-to-event
m-bert 025f549
Change FINGER to TOUCH on android
m-bert f74ce39
Change FINGER to TOUCH on web
m-bert ab677e2
Remove unnecessary setCurrentPointerType in NativeViewGestureHandler …
m-bert 6a92b89
Change Pen to Stylus in PointerEventManager
m-bert 77ab5ce
Remove setting pointerType in handleDragEnter
m-bert File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
(just for clarification) I assume there is no need to set type of pointer on
MotionEvent.ACTION_HOVER_EXITright?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.
Yes, I don't think we need to set that on exit. The main idea was to set this variable when gesture receives first event (inside
onPointerDownon web,touchesBeganon iOS, etc.).Now I see that in
NativeViewGestureHandleron iOS i callsetCurrentPointerTypealso onTouchUpmethods. I will check if it is necessary.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.
As I said, I've tested that and it seems that we don't need most of those calls. I removed them in ab677e2. I've left one in
handleDragEntersince I'm not sure when this method is called. If you know how to test it let me know, I'll be grateful, cc @j-piasecki.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.
handleDragEntershould be called when pointer moves into the view boundary without touching down. I'm not sure whether it requires to start drag inside the view (touch the view -> drag outside -> drag back inside) or not (touch outside the view -> drag into the view)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.
Okay, I've just checked that and it does require to start drag inside of view. Given that, I removed the line that sets
pointerTypeinside that function in 77ab5ce.