diff --git a/src/handler/ShiftDragZoom.js b/src/handler/ShiftDragZoom.js index 7677f7cb..5945da8d 100644 --- a/src/handler/ShiftDragZoom.js +++ b/src/handler/ShiftDragZoom.js @@ -3,12 +3,16 @@ */ L.Handler.ShiftDragZoom = L.Handler.extend({ + initialize: function(map, enabled) { + this._container = map._container; + this._pane = map._panes.overlayPane; + + L.Handler.prototype.initialize.apply(this, arguments); + }, + enable: function() { if (this._enabled) { return; } - this._container = this._map._container; - this._pane = this._map._panes.overlayPane; - L.DomEvent.addListener(this._container, 'mousedown', this._onMouseDown, this); this._enabled = true;