Skip to content

Commit

Permalink
Renamed draw:enabled/draw:disabled events to make more sense.
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobtoye committed Feb 8, 2013
1 parent 186fbbd commit e23c277
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions BREAKINGCHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ map.on('draw:marker-created', function (e) {
});
````

## Draw handler enabled/disabled event change
## Draw handler started/stopped event change

Renamed the drawing enabled and disabled events to be the same as the created standard.
Renamed the drawing started and stopped events to be the same as the created standard.

`drawing` -> `draw:enabled` and `drawing-disabled` -> `draw:disabled`
`drawing` -> `draw:drawstart` and `drawing-disabled` -> `draw:drawstop`

## CSS changes

Expand Down
4 changes: 2 additions & 2 deletions src/draw/handler/Draw.Feature.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ L.Draw.Feature = L.Handler.extend({
if (this._enabled) { return; }

this.fire('enabled', { handler: this.type });
this._map.fire('draw:enabled', { drawingType: this.type });
this._map.fire('draw:drawstart', { drawingType: this.type });
L.Handler.prototype.enable.call(this);
},

disable: function () {
if (!this._enabled) { return; }

this.fire('disabled', { handler: this.type });
this._map.fire('draw:disabled', { drawingType: this.type });
this._map.fire('draw:drawstop', { drawingType: this.type });
L.Handler.prototype.disable.call(this);
},

Expand Down

0 comments on commit e23c277

Please sign in to comment.