moved tree initialization into the widget

This commit is contained in:
zadam
2020-01-12 09:12:13 +01:00
parent 9e031dcd60
commit 0f8a7bad06
4 changed files with 166 additions and 122 deletions

View File

@@ -4,10 +4,11 @@ const $contextMenuContainer = $("#context-menu-container");
let dateContextMenuOpenedMs = 0;
/**
* @param {NoteTreeWidget} treeWidget
* @param event - originating click event (used to get coordinates to display menu at position)
* @param {object} contextMenu - needs to have getContextMenuItems() and selectContextMenuItem(e, cmd)
*/
async function initContextMenu(event, contextMenu) {
async function initContextMenu(treeWidget, event, contextMenu) {
event.stopPropagation();
$contextMenuContainer.empty();