use client coords not screen coords

This commit is contained in:
LenAnderson 2023-11-23 17:42:31 +00:00
parent af2b108730
commit 81f135fa7c
1 changed files with 3 additions and 3 deletions

View File

@ -34,10 +34,10 @@ export class ContextMenu {
show({screenX, screenY}) {
show({clientX, clientY}) {
this.render();
this.menu.style.bottom = `${window.innerHeight - screenY}px`;
this.menu.style.left = `${screenX}px`;
this.menu.style.bottom = `${window.innerHeight - clientY}px`;
this.menu.style.left = `${clientX}px`;
document.body.append(this.root);
}
hide() {