ShiftDragZoom.enable fix

This commit is contained in:
Mourner 2011-03-22 12:36:03 +02:00
parent ed34988ca6
commit 701c0d3fbb

View File

@ -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;