From 870365de4c2b82788866b00b1019f43372e139e5 Mon Sep 17 00:00:00 2001 From: ghybs Date: Mon, 12 Feb 2018 16:51:37 +0400 Subject: [PATCH] Fix(MarkerDrag): get rid of L.DomUtil calls (#6047) * Style(MarkerDrag): fix smart tab indentation * Fix(MarkerDrag): get rid of L.DomUtil global call and rely on imported DomUtil instead. --- src/layer/marker/Marker.Drag.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/layer/marker/Marker.Drag.js b/src/layer/marker/Marker.Drag.js index b9b44e05..82a0b8b1 100644 --- a/src/layer/marker/Marker.Drag.js +++ b/src/layer/marker/Marker.Drag.js @@ -67,7 +67,7 @@ export var MarkerDrag = Handler.extend({ map = marker._map, speed = this._marker.options.autoPanSpeed, padding = this._marker.options.autoPanPadding, - iconPos = L.DomUtil.getPosition(marker._icon), + iconPos = DomUtil.getPosition(marker._icon), bounds = map.getPixelBounds(), origin = map.getPixelOrigin(); @@ -91,7 +91,7 @@ export var MarkerDrag = Handler.extend({ this._draggable._newPos._add(movement); this._draggable._startPos._add(movement); - L.DomUtil.setPosition(marker._icon, this._draggable._newPos); + DomUtil.setPosition(marker._icon, this._draggable._newPos); this._onDrag(e); this._panRequest = requestAnimFrame(this._adjustPan.bind(this, e)); @@ -123,7 +123,7 @@ export var MarkerDrag = Handler.extend({ _onDrag: function (e) { var marker = this._marker, shadow = marker._shadow, - iconPos = DomUtil.getPosition(marker._icon), + iconPos = DomUtil.getPosition(marker._icon), latlng = marker._map.layerPointToLatLng(iconPos); // update shadow position