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.
This commit is contained in:
parent
224bb9372b
commit
870365de4c
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user