Skip to content

Commit

Permalink
Update GraphViewer.cs
Browse files Browse the repository at this point in the history
Set GeometryLabel
  • Loading branch information
levnach committed Jul 22, 2024
1 parent e1ec242 commit 2b1c6dc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion GraphLayout/tools/WpfGraphControl/GraphViewer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1439,6 +1439,11 @@ static TextBlock CreateTextBlock(Label drawingLabel) {
textBlock.Measure(new Size(double.PositiveInfinity, double.PositiveInfinity));
textBlock.Width = textBlock.DesiredSize.Width;
textBlock.Height = textBlock.DesiredSize.Height;
if (drawingLabel.GeometryLabel == null) {
drawingLabel.GeometryLabel = new Core.Layout.Label();
}
drawingLabel.GeometryLabel.Width = textBlock.Width;
drawingLabel.GeometryLabel.Height = textBlock.Height;
return textBlock;
}

Expand Down Expand Up @@ -1729,4 +1734,4 @@ void MakeRoomForNewNode(Drawing.Node drawingNode) {
public bool IncrementalDraggingModeAlways { get; set; }
public bool CreateToolTipForNodes { get => createToolTipForNodes; private set => createToolTipForNodes = value; }
}
}
}

0 comments on commit 2b1c6dc

Please sign in to comment.