Closed lightoze closed 9 years ago
As Popup is now a real layer in Leaflet 1.0, maybe the right fix would be to remove the close listener totally and just use added/remove events and naming also in the Java API? Don't remember right away if it is there in GWT API, but should definitely be added.
BTW. slf4j-simple dependency removal is just fine in this pull request as well.
I've updated the patch. This remove
event is fired so indirectly from Leaflet Map that I did not see it while reading its source :)
Yep, I noticed that, but meant that maybe Popup should now extend org.peimari.gleaflet.client.Layer and that class should have addRemoveListener/addAddedListener ?
Well, I'd like to change all v-leaflet layer connectors so that they do not re-create widgets on every state change. That would quite probably require changes in g-leaflet as well, so I'd better to change Popup along that later work.
Fair enough, I'll pull this in. I can look at the refactoring as well once I find a moment to work with leaflet integrations.
Just let me know if you need release for your project, otherwise I'll wait for some other fixes as well.
There's no
close
event in Leaflet, but there ispopupclose
. Also there's a problem thatpopupclose
is not fired against standalone popup layer, for which I've proposed a fix in https://github.com/Leaflet/Leaflet/pull/3812 and manually merged it into g-leaflet for now.As a bonus, #19 is fixed here because I'm lazy to create separate branch