Use HTML tooltip for marker display when it exists

This commit is contained in:
James Lyne 2022-01-15 15:50:27 +00:00
parent 42e553bda7
commit f47bf8e691
5 changed files with 5 additions and 5 deletions

View File

@ -32,7 +32,7 @@ export class GenericMarker extends Marker {
this.options.icon = new GenericIcon({
icon: options.icon,
label: options.tooltip,
label: options.tooltipHTML || options.tooltip,
iconSize: options.dimensions,
isHtml: !!options.tooltipHTML,
});

View File

@ -33,7 +33,7 @@ export const createArea = (options: LiveAtlasAreaMarker, converter: Function): L
}
if (options.tooltip) {
area.bindTooltip(() => options.tooltip as string, tooltipOptions);
area.bindTooltip(() => options.tooltipHTML || options.tooltip, tooltipOptions);
}
return area;

View File

@ -33,7 +33,7 @@ export const createCircle = (options: LiveAtlasCircleMarker, converter: Function
}
if (options.tooltip) {
circle.bindTooltip(() => options.tooltip as string, tooltipOptions);
circle.bindTooltip(() => options.tooltipHTML || options.tooltip, tooltipOptions);
}
return circle;

View File

@ -31,7 +31,7 @@ export const createLine = (options: LiveAtlasLineMarker, converter: Function): L
}
if (options.tooltip) {
line.bindTooltip(() => options.tooltip as string, tooltipOptions);
line.bindTooltip(() => options.tooltipHTML || options.tooltip, tooltipOptions);
}
return line;

View File

@ -56,7 +56,7 @@ export const updatePointMarker = (marker: Marker | undefined, options: LiveAtlas
if(icon && icon instanceof GenericIcon) {
icon.update({
icon: options.icon,
label: options.tooltip,
label: options.tooltipHTML || options.tooltip,
iconSize: options.dimensions,
isHtml: !!options.tooltipHTML,
});