Support dashed circles

This commit is contained in:
Stephen Kraushaar
2016-06-25 01:42:02 -05:00
committed by GitHub
parent 99d01cd923
commit 6f10ff8614

View File

@ -6117,6 +6117,12 @@ L.Polygon.include(!L.Path.CANVAS ? {} : {
L.Circle.include(!L.Path.CANVAS ? {} : { L.Circle.include(!L.Path.CANVAS ? {} : {
_drawPath: function () { _drawPath: function () {
if (this.options.dashArray) {
var da = typeof(this.options.dashArray) === "string" ? this.options.dashArray.split(",").map(function(el,ix,ar) { return parseInt(el); }) : this.options.dashArray;
this._ctx.setLineDash(da);
} else {
this._ctx.setLineDash([]);
}
var p = this._point; var p = this._point;
this._ctx.beginPath(); this._ctx.beginPath();
this._ctx.arc(p.x, p.y, this._radius, 0, Math.PI * 2, false); this._ctx.arc(p.x, p.y, this._radius, 0, Math.PI * 2, false);