context menu

This commit is contained in:
Jan Prochazka
2021-03-20 08:16:32 +01:00
parent dcb4c5071a
commit efc07280a6
8 changed files with 106 additions and 20 deletions

View File

@@ -4,6 +4,7 @@ import { currentDropDownMenu } from '../stores';
export default function contextMenu(node, items) {
const handleContextMenu = e => {
e.preventDefault();
e.stopPropagation();
const left = e.pageX;
const top = e.pageY;
currentDropDownMenu.set({ left, top, items: _.isFunction(items) ? items() : items });