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

Fix leaflet-layer-group #38

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Compufreak345
Copy link
Contributor

Fixed a typo in a method name, added a semicolon, added content-tag so this.children actually finds children.

In my testcase the layer-group is still not displayed on the map, but at least it does not throw errors causing the map to not render anymore...
Added missing semicolon & <content></content> so children can actually be found.
@Compufreak345 Compufreak345 changed the title Fix typo on method name causing errors Fix leaflet-layer-group Jul 31, 2015
@Compufreak345
Copy link
Contributor Author

Hmm I just saw that for dynamically added (dom-repeat) items this only works in Chrome right now, in Firefox & Safari the elements inside the group do not get drawn if added dynamically. Static items work. I'll have a deeper look into it tomorrow. Probably has something to do with the MutationObserver.

Needed for Firefox & Safari to work with dom-repeat.
Might be better to reregister the mutationObserver at the right point, but until now I did not see any issues.
@Compufreak345
Copy link
Contributor Author

I fixed the problem mentioned in my last comment by re-adding the mutation observer like mentioned in http://stackoverflow.com/questions/31156079/how-to-use-mutation-observers-in-polymer-1-0/31571790#31571790 . There also was an error loading the map in Safari caused by trying to detach a non-existing mutation observer in leaflet-core. I just checked if it exists and did not see any negative side effects, but it's probably not the most elegant solution.

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.

1 participant