azkaban-aplcache

fix bug #1508: fix graph visualisation when exploding nested

10/5/2017 2:41:54 PM

Details

diff --git a/azkaban-web-server/src/web/js/azkaban/util/layout.js b/azkaban-web-server/src/web/js/azkaban/util/layout.js
index 137a067..2736b8e 100644
--- a/azkaban-web-server/src/web/js/azkaban/util/layout.js
+++ b/azkaban-web-server/src/web/js/azkaban/util/layout.js
@@ -212,22 +212,28 @@ function layoutGraph(nodes, edges, hmargin) {
       var destX = nodeMap[dest].x;
 
       var guides = [];
+      var pointArray = new Array();
+      pointArray.push([nodeMap[src].x, nodeMap[src].y]);
       var dummies = edgeDummies[edgeId];
       for (var j = 0; j < dummies.length; ++j) {
         var point = {x: dummies[j].x, y: dummies[j].y};
         guides.push(point);
+        pointArray.push([point.x, point.y]);
 
         var nextX = j == dummies.length - 1 ? destX : dummies[j + 1].x;
         if (point.x != prevX && point.x != nextX) {
           // Add gap
           if ((point.x > prevX) == (point.x > nextX)) {
             guides.push({x: point.x, y: point.y + cornerGap});
+            pointArray.push([point.x, point.y + cornerGap]);
           }
         }
         prevX = point.x;
       }
 
+      pointArray.push([nodeMap[dest].x, nodeMap[dest].y]);
       edge.guides = guides;
+      edge.oldpoints = pointArray;
     }
     else {
       edge.guides = null;