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

Remove "leaflet-cluster-anim" class on map remove while spiderfied #607

Merged

Conversation

ghybs
Copy link
Contributor

@ghybs ghybs commented Nov 27, 2015

Following issue #605, replaced this._unspiderfy() by this._noanimationUnspiderfy() in L.MarkerClusterGroup._spiderfierOnRemove of file MarkerCluster.Spiderfier.js to avoid leaving behind class "leaflet-cluster-anim" on mapPane.

Also added corresponding test in "spiderfySpec" spec suite.

Also took the opportunity to remove event listener map.on('zoomend', this._noanimationUnspiderfy, this) on remove from map.

to avoid leaving class "leaflet-cluster-anim" on mapPane when the MCG is removed from map while it is spiderfied (see Leaflet#605)
class "leaflet-cluster-anim" checks for add then remove when spiderfying / unspiderfying, and not left behing when removing MCG from map while it is spiderfied.
_noanimationUnspiderfy was not de-bound from map "zoomend" event when group is removed from map.
danzel added a commit that referenced this pull request Dec 7, 2015
…erfied

Remove "leaflet-cluster-anim" class on map remove while spiderfied
@danzel danzel merged commit 5848031 into Leaflet:master Dec 7, 2015
@danzel
Copy link
Member

danzel commented Dec 7, 2015

Awesome, thanks.

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.

None yet

2 participants