|
|
|
@ -80,7 +80,31 @@ export class AppComponent implements OnInit {
|
|
|
|
|
|
|
|
|
|
this.menuTarget = node;
|
|
|
|
|
this.lastClickEvent = [tree, node, $event];
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
contextMenu: (tree, node, event) => {
|
|
|
|
|
event.preventDefault();
|
|
|
|
|
event.stopPropagation();
|
|
|
|
|
|
|
|
|
|
TREE_ACTIONS.FOCUS(tree, node, event);
|
|
|
|
|
TREE_ACTIONS.EXPAND(tree, node, event);
|
|
|
|
|
|
|
|
|
|
this.addChildTarget = false;
|
|
|
|
|
this.deleteTarget = false;
|
|
|
|
|
this.menuTarget = false;
|
|
|
|
|
|
|
|
|
|
if ( !node.data.noChildren && (!node.data.level || node.data.level === 'manage') ) {
|
|
|
|
|
this.addChildTarget = node;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ( !node.data.noDelete && (!node.data.level || node.data.level === 'manage') ) {
|
|
|
|
|
this.deleteTarget = node;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.menuTarget = node;
|
|
|
|
|
this.lastClickEvent = [tree, node, event];
|
|
|
|
|
|
|
|
|
|
this.onNodeMenuClick(event);
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|