refactor(core): use flowElements type as arg for removeSelectedElements

This commit is contained in:
braks
2022-10-14 21:13:39 +02:00
committed by Braks
parent 583efe6c68
commit ea9da0adb7
3 changed files with 13 additions and 16 deletions
+1 -1
View File
@@ -171,7 +171,7 @@ export interface Actions extends ViewportFunctions {
/** manually unselect nodes and remove from state */
removeSelectedNodes: (nodes: GraphNode[]) => void
/** unselect selected elements (if none are passed, all elements are unselected) */
removeSelectedElements: (elements?: { nodes?: GraphNode[]; edges?: GraphEdge[] }) => void
removeSelectedElements: (elements?: Elements) => void
/** apply min zoom value to d3 */
setMinZoom: (zoom: number) => void
/** apply max zoom value to d3 */
+1 -1
View File
@@ -37,6 +37,6 @@ export const handleNodeClick = (
if (!node.selected) {
addSelectedNodes([node])
} else if (node.selected && multiSelectionActive) {
removeSelectedElements({ nodes: [node] })
removeSelectedElements([node])
}
}