feat: change context menu from using cursor to pointer terminology
This commit is contained in:
parent
ecfa85c0ac
commit
d1518d1001
5 changed files with 9 additions and 9 deletions
|
@ -4,8 +4,8 @@ export default (contextMenu: Ref<ContextMenuInterface>) => {
|
|||
console.log("resetting and hiding context menu");
|
||||
contextMenu.value = {
|
||||
show: false,
|
||||
cursorX: 0,
|
||||
cursorY: 0,
|
||||
pointerX: 0,
|
||||
pointerY: 0,
|
||||
items: []
|
||||
}
|
||||
console.log("hidden context menu");
|
||||
|
|
|
@ -2,11 +2,11 @@ import { render } from "vue";
|
|||
import ContextMenu from "~/components/UserInterface/ContextMenu.vue";
|
||||
import type { ContextMenuInterface, ContextMenuItem } from "~/types/interfaces";
|
||||
|
||||
export default (e: MouseEvent, contextMenu: ContextMenuInterface, menuItems: ContextMenuItem[]) => {
|
||||
export default (e: MouseEvent | PointerEvent, contextMenu: ContextMenuInterface, menuItems: ContextMenuItem[]) => {
|
||||
console.log("Showing context menu");
|
||||
contextMenu.show = true;
|
||||
contextMenu.cursorX = e.clientX;
|
||||
contextMenu.cursorY = e.clientY;
|
||||
contextMenu.pointerX = e.clientX;
|
||||
contextMenu.pointerY = e.clientY;
|
||||
contextMenu.items = menuItems;
|
||||
console.log("Showed");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue