Skip to content

Commit

Permalink
fixed circle drawing bug
Browse files Browse the repository at this point in the history
  • Loading branch information
bshenk committed Apr 13, 2016
1 parent 60777c7 commit d302a6a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/draw/handler/Draw.Circle.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ L.Draw.Circle = L.Draw.SimpleShape.extend({

_drawShape: function (latlng) {
if (!this._shape) {
this._shape = new L.Circle(this._startLatLng, this._startLatLng.distanceTo(latlng), this.options.shapeOptions);
this._shape = new L.circle(this._startLatLng, this._startLatLng.distanceTo(latlng), this.options.shapeOptions);
this._map.addLayer(this._shape);
} else {
this._shape.setRadius(this._startLatLng.distanceTo(latlng));
}
},

_fireCreatedEvent: function () {
var circle = new L.Circle(this._startLatLng, this._shape.getRadius(), this.options.shapeOptions);
var circle = new L.circle(this._startLatLng, this._shape.getRadius(), this.options.shapeOptions);
L.Draw.SimpleShape.prototype._fireCreatedEvent.call(this, circle);
},

Expand Down

0 comments on commit d302a6a

Please sign in to comment.