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

jsvmap-tooltip not cleaned up properly #13

Closed
jepperaskdk opened this issue Nov 21, 2020 · 3 comments
Closed

jsvmap-tooltip not cleaned up properly #13

jepperaskdk opened this issue Nov 21, 2020 · 3 comments
Labels
enhancement New feature or request

Comments

@jepperaskdk
Copy link

jepperaskdk commented Nov 21, 2020

Not sure if this is related to Angular.

I've added a navigate in onMarkerSelected, but the tooltip being hovered when clicking remains in DOM. Is there a way to destroy the map before navigating? As a workaround I'm using this before navigating:
window.document.querySelectorAll(".jsvmap-tooltip").forEach(n => n.remove());

@themustafaomar themustafaomar added the enhancement New feature or request label Nov 21, 2020
@themustafaomar
Copy link
Owner

Hi @jepperaskdk

Actually, I had the same problem and more when I navigate to another route in my Vue apps.

So, I decided to introduce a new method destroy to remove event listeners, tooltip, and everything related in the next version which hopefully will be released this week.

@themustafaomar
Copy link
Owner

v1.2.0 is released with destroy method.

@jepperaskdk
Copy link
Author

@themustafaomar Cool, thank you for a quick fix. Works perfectly. 👍

themustafaomar added a commit that referenced this issue Dec 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants