diff --git a/docs/demos/markers/custom-tooltip.md b/docs/demos/markers/custom-tooltip.md index 33616e814..3f8f3163b 100644 --- a/docs/demos/markers/custom-tooltip.md +++ b/docs/demos/markers/custom-tooltip.md @@ -59,10 +59,13 @@ viewer.addEventListener('ready', () => { .custom-tooltip { max-width: none; width: 300px; - padding: 0; box-shadow: 0 0 0 3px white; } +.custom-tooltip .psv-tooltip-content { + padding: 0; +} + .custom-tooltip img { width: 100%; border-radius: 4px 4px 0 0; diff --git a/examples/plugin-markers.html b/examples/plugin-markers.html index 1ab425f4c..c74a42063 100644 --- a/examples/plugin-markers.html +++ b/examples/plugin-markers.html @@ -23,9 +23,11 @@ .custom-tooltip { max-width: none; width: 300px; - padding: 0; box-shadow: 0 0 0 3px white; } + .custom-tooltip .psv-tooltip-content { + padding: 0; + } .custom-tooltip img { width: 100%; diff --git a/packages/core/src/components/Tooltip.ts b/packages/core/src/components/Tooltip.ts index 512d5db8e..6b79d4686 100644 --- a/packages/core/src/components/Tooltip.ts +++ b/packages/core/src/components/Tooltip.ts @@ -175,11 +175,6 @@ export class Tooltip extends AbstractComponent { * @throws {@link PSVError} if the configuration is invalid */ update(content: string, config?: TooltipPosition) { - if (this.state.state === TooltipState.SHOWING) { - requestAnimationFrame(() => this.update(content, config)); - return; - } - this.content.innerHTML = content; const rect = this.container.getBoundingClientRect();