Skip to content

Commit 160bdac

Browse files
authored
Fix spacing for collapsed view (#1294)
1 parent 88c4d31 commit 160bdac

2 files changed

Lines changed: 1257 additions & 1254 deletions

File tree

src/main/frontend/pipeline-graph-view/pipeline-graph/main/NestedPipelineGraphLayout.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,6 @@ export function nestedGraphLayout(
5959
buildGraphNested(root, stages, layout, false);
6060
}
6161

62-
root.y =
63-
root.shiftY + (showNames ? layout.nodeRadius + layout.labelOffsetV : 0);
6462
root.children.push({
6563
...baseGraphNode(layout, showNames),
6664
width: graphSpacingX,
@@ -71,6 +69,8 @@ export function nestedGraphLayout(
7169
key: "end-node",
7270
id: -3,
7371
});
72+
73+
root.y = root.shiftY + layout.nodeRadius + 4;
7474
root.width =
7575
root.shiftX + sumGraphNodeProp(root, "width") - startEndReducedSpacing;
7676
const measuredWidth = root.width;
@@ -191,6 +191,8 @@ function buildGraphCollapsed(
191191
stages: collapsedStages.slice(breakPoint),
192192
});
193193
}
194+
195+
root.shiftY = maxGraphNodeProp(root, "shiftY");
194196
}
195197

196198
function buildGraphNested(
@@ -587,6 +589,7 @@ export function removeFalseOptionalGraphNodeFlags(node: GraphNode) {
587589
if (!node.hasParallel) delete node.hasParallel;
588590
if (!node.hasSmallLabel) delete node.hasSmallLabel;
589591
if (!node.hasStageEnd) delete node.hasStageEnd;
592+
if (!node.hasTiming) delete node.hasTiming;
590593
if (!node.isHidden) delete node.isHidden;
591594
if (!node.isParallel) delete node.isParallel;
592595
if (!node.isSkipped) delete node.isSkipped;

0 commit comments

Comments
 (0)