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
@@ -360,16 +361,25 @@ function addDownstreams(workflows: WorkflowType[]) {
360
361
})
361
362
}
362
363
363
-
functionaddDimensionsToDownstreamDeployments(
364
-
downstreams: Array<NodeAttr>,
365
-
dimensions: WorkflowDimensions,
366
-
startX: number,
367
-
startY: number,
368
-
){
369
-
letlastY=startY
364
+
/**
365
+
*
366
+
* @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.
367
+
* @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
377
+
letmaxY=startY-cdNodesGap
370
378
for(letindex=0;index<downstreams.length;index++){
371
379
constelement=downstreams[index]
372
-
letcdNodeY=lastY
380
+
maxY=maxY+cdNodesGap
381
+
constcdNodeY=maxY
382
+
// From here onwards For Y value we will only change maxY for next iteration and wont need to change current cdNodeY
0 commit comments