Fix panFocus on icon with no iconSize (#8091)

This commit is contained in:
Florian Bischof
2022-03-28 09:58:49 +02:00
committed by GitHub
parent 4e6604c70f
commit 09dab3c1cb
2 changed files with 13 additions and 1 deletions

View File

@ -389,7 +389,7 @@ export var Marker = Layer.extend({
if (!map) { return; }
var iconOpts = this.options.icon.options;
var size = point(iconOpts.iconSize);
var size = iconOpts.iconSize ? point(iconOpts.iconSize) : point(0, 0);
var anchor = iconOpts.iconAnchor ? point(iconOpts.iconAnchor) : point(0, 0);
map.panInside(this._latlng, {