added on open
This commit is contained in:
1 parent
64cafb401f
commit
dc955fcee3
2 files changed
+3
-2
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user