An event target is considered a marker if it has getLatLng and no or small radius (#5885)

Fixes #5635.
carto
Per Liedman 7 years ago committed by Vladimir Agafonkin
parent 50b77520b3
commit 0bcccb0190

@ -1365,7 +1365,7 @@ export var Map = Evented.extend({
};
if (e.type !== 'keypress') {
var isMarker = (target.options && 'icon' in target.options);
var isMarker = target.getLatLng && (!target._radius || target._radius <= 10);
data.containerPoint = isMarker ?
this.latLngToContainerPoint(target.getLatLng()) : this.mouseEventToContainerPoint(e);
data.layerPoint = this.containerPointToLayerPoint(data.containerPoint);

Loading…
Cancel
Save