From dc955fcee37fcdecb505a95b37fc325c5f54b1a9 Mon Sep 17 00:00:00 2001 From: Ari Sosnovsky Date: Wed, 15 Dec 2021 11:02:56 -0500 Subject: [PATCH] added on open --- webapp/src/components/DAGSvgs/Board.tsx | 3 +-- webapp/src/components/DAGSvgs/DAGBoard.tsx | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/webapp/src/components/DAGSvgs/Board.tsx b/webapp/src/components/DAGSvgs/Board.tsx index 936271e..f23949e 100644 --- a/webapp/src/components/DAGSvgs/Board.tsx +++ b/webapp/src/components/DAGSvgs/Board.tsx @@ -1,6 +1,5 @@ import "./Board.css"; -import { FC, useState } from 'react'; -import { Point } from 'types/graphs'; +import { FC } from 'react'; import useWindowSize from "utils/useWindowSize"; import { useBoardStyles } from "./styles"; import { NODE_HEIGHT, NODE_WIDTH } from './constants'; diff --git a/webapp/src/components/DAGSvgs/DAGBoard.tsx b/webapp/src/components/DAGSvgs/DAGBoard.tsx index 60213f5..9715b23 100644 --- a/webapp/src/components/DAGSvgs/DAGBoard.tsx +++ b/webapp/src/components/DAGSvgs/DAGBoard.tsx @@ -21,6 +21,7 @@ export interface DAGNodeElm { node: AutomationNode; onRemove: () => void; onAdd?: () => void; + onOpen?: () => void; } export interface DAGEdgeElm { type: 'edge'; @@ -91,6 +92,7 @@ export function* mapDataToElements({ text={getDescriptionFromAutomationNode(elm.node)} color={elm.node.$smType === 'action' ? 'green' : 'blue'} onXClick={elm.onRemove} + onOpenClick={elm.onOpen} /> if (elm.onAdd) { yield