@@ -51,7 +51,7 @@ L.MarkerCluster.include({
51
51
} ,
52
52
53
53
_generatePointsCircle : function ( count , centerPt ) {
54
- var circumference = this . _circleFootSeparation * ( 2 + count ) ,
54
+ var circumference = this . _group . options . spiderfyDistanceMultiplier * this . _circleFootSeparation * ( 2 + count ) ,
55
55
legLength = circumference / this . _2PI , //radius from circumference
56
56
angleStep = this . _2PI / count ,
57
57
res = [ ] ,
@@ -68,17 +68,19 @@ L.MarkerCluster.include({
68
68
} ,
69
69
70
70
_generatePointsSpiral : function ( count , centerPt ) {
71
- var legLength = this . _spiralLengthStart ,
71
+ var legLength = this . _group . options . spiderfyDistanceMultiplier * this . _spiralLengthStart ,
72
+ separation = this . _group . options . spiderfyDistanceMultiplier * this . _spiralFootSeparation ,
73
+ lengthFactor = this . _group . options . spiderfyDistanceMultiplier * this . _spiralLengthFactor ,
72
74
angle = 0 ,
73
75
res = [ ] ,
74
76
i ;
75
77
76
78
res . length = count ;
77
79
78
80
for ( i = count - 1 ; i >= 0 ; i -- ) {
79
- angle += this . _spiralFootSeparation / legLength + i * 0.0005 ;
81
+ angle += separation / legLength + i * 0.0005 ;
80
82
res [ i ] = new L . Point ( centerPt . x + legLength * Math . cos ( angle ) , centerPt . y + legLength * Math . sin ( angle ) ) . _round ( ) ;
81
- legLength += this . _2PI * this . _spiralLengthFactor / angle ;
83
+ legLength += this . _2PI * lengthFactor / angle ;
82
84
}
83
85
return res ;
84
86
}
0 commit comments