X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/59100a72caedbc8f3c9872de1153bf3d4129122a..2a4f0a7d69cb0cb94b43a05ddff91e4cd06c6c39:/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}
