From d3c7ed13ad7272f41ab1170501357a329a8d2bc9 Mon Sep 17 00:00:00 2001 From: Per Liedman Date: Wed, 8 Mar 2017 15:41:02 +0100 Subject: [PATCH] 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 --- src/map/handler/Map.Drag.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/map/handler/Map.Drag.js b/src/map/handler/Map.Drag.js index fb839754..8ad37faf 100644 --- a/src/map/handler/Map.Drag.js +++ b/src/map/handler/Map.Drag.js @@ -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);