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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

primitives outside of scissor region are not removed from the input list #255

Open
vacarsu opened this issue Dec 13, 2021 · 6 comments
Open
Labels
bug Something isn't working

Comments

@vacarsu
Copy link
Contributor

vacarsu commented Dec 13, 2021

Primitives with the input style can still be interacted with even if they are outside of a scissor region.

edit: this may have to do with #253

@crertel
Copy link
Contributor

crertel commented Dec 13, 2021

My wager (@boydm correct me on this) is that we don't account for stenciling when handling input events--if you look at Scenic.Input.t it looks like input events don't mention where they come in from.

My first guess as to how to handle this is to pass up the visible component where an input hit happens along with the normal information, maybe using stencil buffer picking or something.

@boydm
Copy link
Collaborator

boydm commented Dec 13, 2021

Yeah. it does not account for stenciling when checking for inputs.

@boydm
Copy link
Collaborator

boydm commented Dec 13, 2021

This is going to require some thought

@boydm
Copy link
Collaborator

boydm commented Dec 13, 2021

And also yes, #253 would be the same issue.

@boydm
Copy link
Collaborator

boydm commented Dec 13, 2021

My inital thought is to mark scissor regions in the input tree in the viewport. Then when searching down the tree, it would be pretty easy to see if the point is in the scissor region or not. If yes, continue searching. If not, abandon this branch of the tree.

@vacarsu
Copy link
Contributor Author

vacarsu commented Dec 14, 2021

Yeah, in most cases you don't want to account for stenciling. I remember that being a big pain point in Scenic 0.10.0 where any rendered primitive would block input for any primitive underneath it. It made things like scroll containers impossible.

@crertel crertel added the bug Something isn't working label Dec 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants