Skip to content

Commit

Permalink
Fix #959 markers: leave-marker event fired when updating a marker
Browse files Browse the repository at this point in the history
  • Loading branch information
mistic100 committed Jun 3, 2023
1 parent 352c10f commit 729d54e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/markers-plugin/src/Marker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -364,18 +364,18 @@ export class Marker {
} else {
element.classList.add('psv-marker--poly');
}

// add CSS classes
if (this.config.className) {
utils.addClasses(element, this.config.className);
if (this.state.visible) {
element.classList.add('psv-marker--visible');
}

if (this.config.tooltip) {
element.classList.add('psv-marker--has-tooltip');
}
if (this.config.content) {
element.classList.add('psv-marker--has-content');
}
if (this.config.className) {
utils.addClasses(element, this.config.className);
}

// apply style
element.style.opacity = `${this.config.opacity ?? 1}`;
Expand Down

0 comments on commit 729d54e

Please sign in to comment.