feat(selection): add context menu handler closes #478

This commit is contained in:
moklick
2020-09-11 02:01:33 +02:00
parent fe3dd87d24
commit 121952bba7
5 changed files with 74 additions and 44 deletions
+3
View File
@@ -51,6 +51,7 @@ export interface GraphViewProps {
onSelectionDragStart?: (event: MouseEvent, nodes: Node[]) => void;
onSelectionDrag?: (event: MouseEvent, nodes: Node[]) => void;
onSelectionDragStop?: (event: MouseEvent, nodes: Node[]) => void;
onSelectionContextMenu?: (event: MouseEvent, nodes: Node[]) => void;
selectionKeyCode: number;
nodeTypes: NodeTypesType;
edgeTypes: EdgeTypesType;
@@ -93,6 +94,7 @@ const GraphView = ({
onSelectionDragStart,
onSelectionDrag,
onSelectionDragStop,
onSelectionContextMenu,
connectionLineType,
connectionLineStyle,
selectionKeyCode,
@@ -292,6 +294,7 @@ const GraphView = ({
onSelectionDragStart={onSelectionDragStart}
onSelectionDrag={onSelectionDrag}
onSelectionDragStop={onSelectionDragStop}
onSelectionContextMenu={onSelectionContextMenu}
/>
)}
<div