-
Notifications
You must be signed in to change notification settings - Fork 136
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
Map.OlMap memory leaks and event re-attaching. #406
Comments
@Drahness do you want to contribute? How did you try to run the project locally? I think a manual could be added. Basically you should:
I am happy to assist you. |
Hello @d-koppenhagen , yes I want to contribute, I'll want to use this lib in my projects. Thank you, I was struggling thinking my environment was wrong. Now runs as expected. I was trying with Thank you. Any tip or idea to start contributing? When committing in my fork I must follow any code standards? |
Hey @Drahness , I updated the Contribution info (see: CONTRIBUTING.md) |
Thank you! I will give it a try |
Describe the bug
Where a instance is given to OlMap vue component, it attaches handles for all events even if when are not used by the consumer, it causes overhead emitting events with no purpose, in the worst case, if an instance is used in more than once can cause multiple events to fire with undefined behaviour.
Affected version(s)
+-- ol-contextmenu@5.5.0
+-- ol-ext@4.0.25
+-- ol@10.3.1
+-- vue@3.5.13
`-- vue3-openlayers@11.3.0
To Reproduce
Steps to reproduce the behaviour:
Expected behaviour
Handler functions added from Map are properly disconnected when Map.OlMap Vue component is dismounted, if an event is not used, do not call to the on method in the map instance. This logic can be applied to vue3-openlayers controlled "Map" instances.
Screenshots
Current code:
Crappy solution:
Platform
Additional context
I saw in "src/composables/useOpenLayersEvents.ts" has a good function to attach that logic, I posted this issue because I cannot run locally the project and I doesn't found a guide to do so.
Thank you.
The text was updated successfully, but these errors were encountered: