Skip to content

Commit

Permalink
Performance changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Astul-Betizagasti committed Jul 8, 2020
1 parent 6081f9b commit 91ac44d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/DynamoCore/Graph/Annotations/AnnotationModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -305,8 +305,15 @@ internal void UpdateBoundaryFromSelection()
Height = yDistance + ExtendSize
};



//gets the element that reaches the lowest point inside the annotation
var lowestElement = groupModels.Aggregate((element1, element2) => (element1.Y + element1.Height) > (element2.Y + element2.Height) ? element1 : element2);
var lowestElement = groupModels.First();
foreach (var node in groupModels)
{
if (node.Y + node.Height > lowestElement.Y + lowestElement.Height)
lowestElement = node;
}

//If the last model is Node, then increase the height so that
//node border does not overlap with the group
Expand Down

0 comments on commit 91ac44d

Please sign in to comment.