Use HTML tooltip for marker display when it exists
This commit is contained in:
parent
42e553bda7
commit
f47bf8e691
@ -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,
|
||||
});
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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,
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user