Skip to content

Commit

Permalink
XCD-224: Annotations cannot be deleted because context menu event rem…
Browse files Browse the repository at this point in the history
…over cannot be found
  • Loading branch information
ijlal99 committed Dec 17, 2024
1 parent 95b93d0 commit dede596
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/plugins/AnnotationsPlugin/Annotation.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ class Annotation extends Marker {
this._marker.addEventListener("click", this._onMouseClickedExternalMarker = () => {
this.plugin.fire("markerClicked", this);
});
this._onContextMenuExtenalMarker = () => {
this._onContextMenuExternalMarker = () => {
this.plugin.fire("contextmenu", this);
}
this._onContextMenuExtenalMarkerRemover = addContextMenuListener(this._markerHTML, this._onContextMenuExtenalMarker);
this._onContextMenuExternalMarkerRemover = addContextMenuListener(this._marker, this._onContextMenuExternalMarker);
this._marker.addEventListener("mouseenter", this._onMouseEnterExternalMarker = () => {
this.plugin.fire("markerMouseEnter", this);
});
Expand Down Expand Up @@ -420,7 +420,7 @@ class Annotation extends Marker {
this._marker = null;
} else {
this._marker.removeEventListener("click", this._onMouseClickedExternalMarker);
this._onContextMenuExtenalMarkerRemover();
this._onContextMenuExternalMarkerRemover();
this._marker.removeEventListener("mouseenter", this._onMouseEnterExternalMarker);
this._marker.removeEventListener("mouseleave", this._onMouseLeaveExternalMarker);
this._marker = null;
Expand Down

0 comments on commit dede596

Please sign in to comment.