Skip to content

Commit

Permalink
Fix #1210 markers: errors with polygons tooltips
Browse files Browse the repository at this point in the history
  • Loading branch information
mistic100 committed Jan 20, 2024
1 parent 49ef226 commit 87f2a4e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
5 changes: 4 additions & 1 deletion docs/demos/markers/custom-tooltip.md
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 3 additions & 1 deletion examples/plugin-markers.html
Original file line number Diff line number Diff line change
Expand Up @@ -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%;
Expand Down
5 changes: 0 additions & 5 deletions packages/core/src/components/Tooltip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 87f2a4e

Please sign in to comment.