Stop map on drag start instead of pointer down (#5378)

* Stop map on drag start instead of pointer down; fix #5350

* Remove unused _onDown event handler
This commit is contained in:
Per Liedman 2017-03-08 15:41:02 +01:00 committed by Iván Sánchez Ortega
parent 25014b8825
commit d3c7ed13ad

View File

@ -61,7 +61,6 @@ export var Drag = Handler.extend({
this._draggable = new Draggable(map._mapPane, map._container);
this._draggable.on({
down: this._onDown,
dragstart: this._onDragStart,
drag: this._onDrag,
dragend: this._onDragEnd
@ -95,13 +94,10 @@ export var Drag = Handler.extend({
return this._draggable && this._draggable._moving;
},
_onDown: function () {
this._map._stop();
},
_onDragStart: function () {
var map = this._map;
map._stop();
if (this._map.options.maxBounds && this._map.options.maxBoundsViscosity) {
var bounds = latLngBounds(this._map.options.maxBounds);