Skip to content

Commit

Permalink
Simplification.
Browse files Browse the repository at this point in the history
  • Loading branch information
Manuel Baclet committed Dec 19, 2013
1 parent c214aeb commit b726022
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
4 changes: 1 addition & 3 deletions src/Toolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,7 @@ L.Toolbar = L.Class.extend({

_handlerActivated: function (e) {
// Disable active mode (if present)
if (this._activeMode && this._activeMode.handler.enabled()) {
this._activeMode.handler.disable();
}
this.disable();

// Cache new active feature
this._activeMode = this._modes[e.handler];
Expand Down
6 changes: 0 additions & 6 deletions src/edit/EditToolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,6 @@ L.EditToolbar = L.Toolbar.extend({

L.Toolbar.prototype.removeToolbar.call(this);
},
_handlerActivated: function (e) {
if (this._activeMode && this._activeMode.handler.enabled()) {
this._activeMode.handler.revertLayers();
}
L.Toolbar.prototype._handlerActivated.call(this, e);
},
disable: function () {
if (!this.enabled()) { return; }

Expand Down

0 comments on commit b726022

Please sign in to comment.