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 "./Board.css";
|
||||||
import { FC, useState } from 'react';
|
import { FC } from 'react';
|
||||||
import { Point } from 'types/graphs';
|
|
||||||
import useWindowSize from "utils/useWindowSize";
|
import useWindowSize from "utils/useWindowSize";
|
||||||
import { useBoardStyles } from "./styles";
|
import { useBoardStyles } from "./styles";
|
||||||
import { NODE_HEIGHT, NODE_WIDTH } from './constants';
|
import { NODE_HEIGHT, NODE_WIDTH } from './constants';
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ export interface DAGNodeElm {
|
|||||||
node: AutomationNode;
|
node: AutomationNode;
|
||||||
onRemove: () => void;
|
onRemove: () => void;
|
||||||
onAdd?: () => void;
|
onAdd?: () => void;
|
||||||
|
onOpen?: () => void;
|
||||||
}
|
}
|
||||||
export interface DAGEdgeElm {
|
export interface DAGEdgeElm {
|
||||||
type: 'edge';
|
type: 'edge';
|
||||||
@@ -91,6 +92,7 @@ export function* mapDataToElements({
|
|||||||
text={getDescriptionFromAutomationNode(elm.node)}
|
text={getDescriptionFromAutomationNode(elm.node)}
|
||||||
color={elm.node.$smType === 'action' ? 'green' : 'blue'}
|
color={elm.node.$smType === 'action' ? 'green' : 'blue'}
|
||||||
onXClick={elm.onRemove}
|
onXClick={elm.onRemove}
|
||||||
|
onOpenClick={elm.onOpen}
|
||||||
/>
|
/>
|
||||||
if (elm.onAdd) {
|
if (elm.onAdd) {
|
||||||
yield <DAGEdge
|
yield <DAGEdge
|
||||||
|
|||||||
Reference in new issue
Block a user