-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Clear RenderBox on DragBox Deactivation #15671
Conversation
📦 Preview the website for this branch here: https://deploy-preview-15671--ol-site.netlify.app/. |
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.
Thanks, @behoney! I think the BOXCANCEL event should only be fired when a box is currently being drawn, so I added a suggestion to change this. Looks good otherwise.
Co-authored-by: Andreas Hocevar <andreas.hocevar@gmail.com>
Co-authored-by: M393 <56256405+M393@users.noreply.github.com>
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.
Thanks, @behoney
Currently, when the DragBox interaction is deactivated by calling
setActive(false)
, the RenderBox (which visually represents the dragged area) remains on the map. This Pull Request should resolve #15571 by clearing the RenderBox when the DragBox is deactivated.Changes
In the
setActive
method of theDragBox
class, a new line has been added to call thedisposeInternal
method of thebox_
(RenderBox) instance when active is set tofalse
. This will ensure that the RenderBox is properly disposed and removed from the map.