leaflet-map icon indicating copy to clipboard operation
leaflet-map copied to clipboard

Fix leaflet-layer-group

Open Compufreak345 opened this issue 10 years ago • 2 comments

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

Compufreak345 avatar Jul 31 '15 15:07 Compufreak345

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.

Compufreak345 avatar Jul 31 '15 19:07 Compufreak345

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.

Compufreak345 avatar Aug 01 '15 08:08 Compufreak345