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

Removing an element does not remove the active region #23

Open
Eeems opened this issue Sep 17, 2019 · 3 comments
Open

Removing an element does not remove the active region #23

Eeems opened this issue Sep 17, 2019 · 3 comments
Labels
bug Something isn't working
Milestone

Comments

@Eeems
Copy link
Contributor

Eeems commented Sep 17, 2019

When you remove a named element from the ApplicationContext it stops drawing the element, but if you had an onclick registered, there is still an active region where the element used to be displayed.

@canselcik canselcik changed the title Removing an element does not remote the active region Removing an element does not remove the active region Sep 20, 2019
@canselcik
Copy link
Owner

canselcik commented Sep 20, 2019

I remember this peculiar behavior. This is definitely a bug, at least something that doesn't work the way one would expect it to.

You can work around it by invoking remove_active_region_at_point with any point your element was occupying.

Basically the ActiveRegionHandler in question doesn't get removed from the QuadTree<ActiveRegionHandler> that is active_regions when an element is removed.

@Eeems
Copy link
Contributor Author

Eeems commented Sep 20, 2019

@canselcik That's what I ended up doing after looking through your code
https://github.com/Eeems/oxidize/blob/master/src/bin/corrode.rs#L204-L216

@LoganDark
Copy link
Contributor

LoganDark commented Jan 14, 2022

This should probably be fixed before 0.6.0 releases

@LinusCDE LinusCDE added this to the 0.6.0 milestone Jan 17, 2022
@LinusCDE LinusCDE added the bug Something isn't working label Jan 17, 2022
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

4 participants