You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -367,16 +368,25 @@ function addDownstreams(workflows: WorkflowType[]) {
367
368
})
368
369
}
369
370
370
-
functionaddDimensionsToDownstreamDeployments(
371
-
downstreams: Array<NodeAttr>,
372
-
dimensions: WorkflowDimensions,
373
-
startX: number,
374
-
startY: number,
375
-
){
376
-
letlastY=startY
371
+
/**
372
+
*
373
+
* @description This function is used to add dimensions to downstream deployments, we are recursively traversing the downstream deployments and adding dimensions to them, on each iteration we are updating the lastY coordinate which is used to calculate the Y coordinate of the next deployment, this value is going to be maximum Y coordinate we have encountered so far.
374
+
* @returns maximum Y coordinate we have encountered so far
// Shifting the Y coordinates here since, we are anyways adding cdNodesGap to maxY on start of each iteration and dont want to add that in the end of iteration
384
+
letmaxY=startY-cdNodesGap
377
385
for(letindex=0;index<downstreams.length;index++){
378
386
constelement=downstreams[index]
379
-
letcdNodeY=lastY
387
+
maxY=maxY+cdNodesGap
388
+
constcdNodeY=maxY
389
+
// From here onwards For Y value we will only change maxY for next iteration and wont need to change current cdNodeY
0 commit comments