angular-ui / ui-leaflet

AngularJS directive to embed an interact with maps managed by Leaflet library
http://angular-ui.github.io/ui-leaflet
Other
314 stars 134 forks source link

Path $on click, stops working post pan #7

Open nmccready opened 9 years ago

nmccready commented 9 years ago

From @xamelion on March 6, 2014 18:41

when you move the map click stops working on paths

Copied from original issue: tombatossals/angular-leaflet-directive#313

nmccready commented 9 years ago

From @SeyZ on April 9, 2014 15:53

:100: Same behavior.

@tombatossals Do you know if it's a angular-leaflet-directive issue?

nmccready commented 9 years ago

From @eczajk1 on February 10, 2015 15:57

I have experienced the same problem. :disappointed:

nmccready commented 9 years ago

From @tombatossals on February 10, 2015 16:44

Could anyone post a jsfiddle with this behaviour?

nmccready commented 9 years ago

From @eczajk1 on February 10, 2015 23:7

This fiddle should illustrate it. In summary, click events work fine on paths until the user pans the map. At that point, click events appear to no longer fire.

http://jsfiddle.net/eczajk1/9pb1Lons/

nmccready commented 9 years ago

From @tombatossals on June 29, 2015 20:27

@nmccready, I was just investigating this issue, it seems that in the default event propagation behaviour, where all the path events are propagated, when the map is panned the events stop propagating.

But if you specify which events must be propagated, it's working ok. I have created an example, based on @eczajk1 jsfiddle, to illustrate it, I'm sending a PR.

nmccready commented 9 years ago

thanks I'll take a look

nmccready commented 9 years ago

From @eczajk1 on September 3, 2015 0:45

I wasn't privy to events broadcast directive, but I suppose it solves my issue, fyi.