diff --git a/src/js/gui/ContextMenu.js b/src/js/gui/ContextMenu.js index b09cf6d77..e96986e76 100644 --- a/src/js/gui/ContextMenu.js +++ b/src/js/gui/ContextMenu.js @@ -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);