Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #248 from manubb/master

Simplication in handlers activation/desactivation.
  • Loading branch information...
commit 7db316ea80183728516f57c9049ccd14fdb463f5 2 parents c1c01dd + a3a1657
@jacobtoye jacobtoye authored
Showing with 2 additions and 9 deletions.
  1. +1 −3 src/Toolbar.js
  2. +1 −6 src/edit/EditToolbar.js
View
4 src/Toolbar.js
@@ -148,9 +148,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];
View
7 src/edit/EditToolbar.js
@@ -91,12 +91,7 @@ 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; }
Please sign in to comment.
Something went wrong with that request. Please try again.