Skip to content

Commit

Permalink
fix relMouseCoords when rightclicking to make the context menu appear…
Browse files Browse the repository at this point in the history
… again
  • Loading branch information
bmatthieu3 committed Aug 22, 2023
1 parent 62633d0 commit be619b3
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/js/gui/ContextMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,10 @@ export class ContextMenu {
}

_showMenu(e) {


this.contextMenuUl.className = 'aladin-context-menu';
this.contextMenuUl.innerHTML = '';

const xymouse = Utils.relMouseCoords(view.imageCanvas, e);
const xymouse = Utils.relMouseCoords(this.aladin.view.imageCanvas, e);

this.menuOptions.forEach(opt => this._attachOption(this.contextMenuUl, opt, xymouse));
document.body.appendChild(this.contextMenuUl);
Expand Down

0 comments on commit be619b3

Please sign in to comment.