Skip to content

Commit

Permalink
Fix 🐛 for switching drawing modes, fixes #242 and other problems (pat…
Browse files Browse the repository at this point in the history
…ch) (#240)
  • Loading branch information
codeofsumit committed Oct 10, 2017
1 parent 4433b3c commit e9199f5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/js/Draw/L.PM.Draw.Line.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@ Draw.Line = Draw.extend({
// unbind listeners
this._map.off('click', this._createVertex, this);
this._map.off('mousemove', this._syncHintMarker, this);
this._map.off(this.options.finishOn, this._finishShape, this);
if (this.options.finishOn) {
this._map.off(this.options.finishOn, this._finishShape, this);
}

if (this.tempMapDoubleClickZoomState) {
this._map.doubleClickZoom.enable();
Expand Down

0 comments on commit e9199f5

Please sign in to comment.