-
-
Notifications
You must be signed in to change notification settings - Fork 6k
Description
I have a FeatureGroup that contains two GeoJSON collections. I want to fire a popup on a mouseover event on a GeoJSON feature, and have been doing so with event delegation by binding a mouseover event handler to the parent FeatureGroup.
Prior to 0.7, the event.layer object in the handler would point to the feature that originally triggered the event. It seems to me that 2464d13 is overwriting event.layer to always equal event.target, even if event.layer already has a value. In the above case, event.target = event.layer = the GeoJSON collection containing the layer, with the default context being the parent FeatureGroup. This means I have no way to access the original layer and set the content of the popup from the feature's properties.
I will be sending over a commit shortly that fixes the issue on my end, but I admit I don't understand the issue in #1938 well enough to know that it doesn't regress that fix.