File tree 1 file changed +4
-5
lines changed
1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -709,16 +709,15 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
709
709
} ,
710
710
711
711
_zoomOrSpiderfy : function ( e ) {
712
- var map = this . _map ,
713
- cluster = e . layer ,
712
+ var cluster = e . layer ,
714
713
bottomCluster = cluster ;
715
714
716
715
while ( bottomCluster . _childClusters . length === 1 ) {
717
716
bottomCluster = bottomCluster . _childClusters [ 0 ] ;
718
717
}
719
718
720
- if ( bottomCluster . _zoom === map . getMaxZoom ( ) && bottomCluster . _childCount === cluster . _childCount ) {
721
- // All child markers are contained in a single cluster from map ._maxZoom to this cluster.
719
+ if ( bottomCluster . _zoom === this . _maxZoom && bottomCluster . _childCount === cluster . _childCount ) {
720
+ // All child markers are contained in a single cluster from this ._maxZoom to this cluster.
722
721
if ( this . options . spiderfyOnMaxZoom ) {
723
722
cluster . spiderfy ( ) ;
724
723
}
@@ -728,7 +727,7 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
728
727
729
728
// Focus the map again for keyboard users.
730
729
if ( e . originalEvent && e . originalEvent . keyCode === 13 ) {
731
- map . _container . focus ( ) ;
730
+ this . _map . _container . focus ( ) ;
732
731
}
733
732
} ,
734
733
You can’t perform that action at this time.
0 commit comments