Skip to content

Commit

Permalink
Leaflet#424 Fire draw:canceled event
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon West committed Jul 6, 2016
1 parent d21af94 commit d26e091
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/draw/handler/Draw.Feature.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ L.Draw.Feature = L.Handler.extend({

// Cancel drawing when the escape key is pressed
_cancelDrawing: function (e) {
this._map.fire('draw:canceled', { layerType: this.type });
if (e.keyCode === 27) {
this.disable();
}
Expand Down

0 comments on commit d26e091

Please sign in to comment.