Update src/js/gui/ContextMenu.js

Fixed the missing canvas parameter of the refactored `relMouseCoords` function.

Co-authored-by: Matthieu Baumann <baumannmatthieu0@gmail.com>
This commit is contained in:
Cédric Foellmi
2023-07-19 04:01:47 +02:00
committed by GitHub
parent 0665f2b65f
commit 121f4345bc

View File

@@ -111,7 +111,7 @@ export class ContextMenu {
this.contextMenuUl.className = 'aladin-context-menu';
this.contextMenuUl.innerHTML = '';
const xymouse = Utils.relMouseCoords(e);
const xymouse = Utils.relMouseCoords(view.imageCanvas, e);
this.menuOptions.forEach(opt => this._attachOption(this.contextMenuUl, opt, xymouse));
document.body.appendChild(this.contextMenuUl);