mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-03 18:20:27 +00:00
Set beginning and end points to node coordinates
This is to ignore node bounding box which sometimes leads to disconnected edges.
This commit is contained in:
@@ -93,6 +93,9 @@ const doLayout = function(nodes, edges, width, height, scale, margins, topologyI
|
||||
point.y += offsetY;
|
||||
});
|
||||
edge.points = graphEdge.points;
|
||||
// set beginning and end points to node coordinates to ignore node bounding box
|
||||
edge.points[0] = {x: edge.source.x, y: edge.source.y};
|
||||
edge.points[edge.points.length - 1] = {x: edge.target.x, y: edge.target.y};
|
||||
});
|
||||
|
||||
// return object with the width and height of layout
|
||||
|
||||
Reference in New Issue
Block a user