Skip to content

Commit

Permalink
Fix #1026 markers: showAllTooltips + addMarker compat
Browse files Browse the repository at this point in the history
  • Loading branch information
mistic100 committed Aug 4, 2023
1 parent 1dce343 commit 7a82f8c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/core/src/Viewer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -804,7 +804,9 @@ export class Viewer extends TypedEventTarget<ViewerEvents> {
* @param userDataKey - only objects with the following `userData` will be observed
*/
observeObjects(userDataKey: string): void {
this.state.objectsObservers[userDataKey] = null;
if (!this.state.objectsObservers[userDataKey]) {
this.state.objectsObservers[userDataKey] = null;
}
}

/**
Expand Down
4 changes: 4 additions & 0 deletions packages/markers-plugin/src/MarkersPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,10 @@ export class MarkersPlugin extends AbstractConfigurablePlugin<

this.markers[marker.id] = marker;

if (this.state.showAllTooltips) {
marker.state.staticTooltip = true;
}

if (render) {
this.__afterChangerMarkers();
}
Expand Down

0 comments on commit 7a82f8c

Please sign in to comment.