X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/53782722a55ba35a658b5eca6206566462ab9fbd..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<WorkflowGraphProps, {}> {
     private svgRoot: React.RefObject<SVGSVGElement> = 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<WorkflowGraphProps, {}> {
                 new SVGArrangePlugin(),
                 new SVGEdgeHoverPlugin(),
                 new SVGNodeMovePlugin({
-                    movementSpeed: 10
+                    movementSpeed: 2
                 }),
                 new SVGPortDragPlugin(),
                 new SelectionPlugin(),
@@ -47,6 +47,14 @@ export class WorkflowGraph extends React.Component<WorkflowGraphProps, {}> {
         workflow.draw();
     }
 
+    componentDidMount() {
+        this.setGraph();
+    }
+
+    componentDidUpdate() {
+        this.setGraph();
+    }
+
     render() {
         return <svg
             ref={this.svgRoot}
