Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed tap events #96

Merged
merged 3 commits into from Jun 17, 2022
Merged

Fixed tap events #96

merged 3 commits into from Jun 17, 2022

Conversation

grassydragon
Copy link
Contributor

Please see whether I've accidentally removed something useful 馃槄

I'll pass all touch events to ViewNodes and I'm thinking about using a queue for the initial touch events that happen before the node is picked. Do you think it may be useful to pass all touch events to other nodes as well?

@grassydragon
Copy link
Contributor Author

I've also made it possible to select a parent ArNode by tapping on a child node.

@grassydragon grassydragon marked this pull request as ready for review June 15, 2022 18:45
@grassydragon
Copy link
Contributor Author

Can it be useful to call onTap on all parent nodes? In Sceneform it is referred as bubbling the touch event.

@ThomasGorisse
Copy link
Contributor

Maybe. If we consider that the closest selectable child must receive the onTouch.
In case of parent selectable, child not selectable, when the child is touch, the parent onTouch must be called.
For node selector reason for exemple.

@grassydragon
Copy link
Contributor Author

Yes, the case of selecting an ArNode is now handled like that:

val selectedNode = node?.firstEnclosingNode<ArNode>()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants