X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/7f137c5a4162717b74668a513b8b10a1ed3d8577..e1605f7c93aeb41ae31e0dd88a9afd8709136b62:/src/views/workflow-panel/workflow-graph.tsx diff --git a/src/views/workflow-panel/workflow-graph.tsx b/src/views/workflow-panel/workflow-graph.tsx index de290328..a2faf322 100644 --- a/src/views/workflow-panel/workflow-graph.tsx +++ b/src/views/workflow-panel/workflow-graph.tsx @@ -20,7 +20,7 @@ interface WorkflowGraphProps { export class WorkflowGraph extends React.Component { private svgRoot: React.RefObject = React.createRef(); - componentDidMount(): void { + setGraph() { const graphs = yaml.safeLoad(this.props.workflow.definition, { json: true }); let workflowGraph = graphs; @@ -37,7 +37,7 @@ export class WorkflowGraph extends React.Component { new SVGArrangePlugin(), new SVGEdgeHoverPlugin(), new SVGNodeMovePlugin({ - movementSpeed: 10 + movementSpeed: 2 }), new SVGPortDragPlugin(), new SelectionPlugin(), @@ -47,6 +47,14 @@ export class WorkflowGraph extends React.Component { workflow.draw(); } + componentDidMount() { + this.setGraph(); + } + + componentDidUpdate() { + this.setGraph(); + } + render() { return