Fix error showing label on markers without an iconSize
This commit is contained in:
parent
3e1122d34d
commit
56b07aeaf7
@ -109,13 +109,14 @@ export class GenericIcon extends Layer implements Icon<GenericIconOptions> {
|
||||
}
|
||||
|
||||
this._image?.removeEventListener('mouseover', this._onHover);
|
||||
this._label = markerLabel.cloneNode(false) as HTMLSpanElement;
|
||||
|
||||
if(this.options.iconSize) {
|
||||
const size = point(this.options.iconSize as PointExpression),
|
||||
sizeClass = [size.x, size.y].join('x');
|
||||
|
||||
this._label = markerLabel.cloneNode(false) as HTMLSpanElement;
|
||||
|
||||
this._label.classList.add(/*'markerName_' + set.id,*/ `marker__label--${sizeClass}`);
|
||||
}
|
||||
|
||||
if (this.options.isHtml) {
|
||||
this._label.innerHTML = this.options.label;
|
||||
|
Loading…
Reference in New Issue
Block a user