added on open

This commit is contained in:
ari committed 2021-12-15 11:02:56 -05:00
1 parent 64cafb401f
commit dc955fcee3
2 files changed
+3 -2

No files matched your search

+1 -2
View File
@@ -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';
@@ -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 <DAGEdge