Skip to content

Conversation

@ambareesh1510
Copy link

Fixes #466.

@ambareesh1510
Copy link
Author

Hi @nicbarker, sorry for the delay in getting to this! I've currently marked this PR as a draft because I noticed that some of the changes in #450 coincide with the changes in this PR (closeClipElement should be true only if the element is not offscreen -- in fact, I just copy-pasted those two lines from your PR into my code). This change is necessary for my fix to work; would you prefer that I remove it from my PR so that yours can be merged first?

@nicbarker
Copy link
Owner

👋 Hello, thanks so much for the work here! I'll take a look and then let's get it merged. Totally fine to have those two lines from the other PR in here, we can close out that one 🙂

@ambareesh1510
Copy link
Author

Sounds good, I'll mark it as ready for review then.

@ambareesh1510 ambareesh1510 marked this pull request as ready for review August 14, 2025 00:29
@nicbarker
Copy link
Owner

nicbarker commented Aug 14, 2025

Just letting you know that I'm doing a bit of digging here, because there's a bit of trickyness around floating elements - it's possible to attach floating elements later in the declaration that include a clip rectangle, and as a result we can't rely on visiting them as part of the DFS. I'm sure we can figure something out 🙂

@nicbarker nicbarker changed the title Add scissor data stack to fix nested clip elements displaying incorrectly [Core] Add scissor data stack to fix nested clip elements displaying incorrectly Aug 14, 2025
@filippocrocchini
Copy link

filippocrocchini commented Aug 23, 2025

Hey I found myself implementing almost the same thing to handle custom input, it's nice to know what portion of an element you can interact with when it's partially clipped.

Here's my specific case (context, I am checking against the bounding box, but it would be nice to have a clipped bounding box too)

image

@filippocrocchini
Copy link

This PR doesn't compile in C++ here's what I changed to fix that: d2f2344

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.

[Core] Nested clip elements behave incorrectly

3 participants