/// <inheritdoc/> protected override LayoutData CreateConfiguredLayoutData(GraphControl graphControl, ILayoutAlgorithm layout) { var layoutData = new BalloonLayoutData(); if (RootNodePolicyItem == RootNodePolicy.SelectedRoot) { var selection = graphControl.Selection.SelectedNodes; if (selection.Any()) { var root = selection.First(); layoutData.TreeRoot.Delegate = node => node == root; } } return(layoutData); }
/// <inheritdoc/> protected override LayoutData CreateConfiguredLayoutData(GraphControl graphControl, ILayoutAlgorithm layout) { var layoutData = new BalloonLayoutData(); if (RootNodePolicyItem == RootNodePolicy.SelectedRoot) { var selection = graphControl.Selection.SelectedNodes; if (selection.Any()) { layoutData.TreeRoot.Item = selection.First(); } } return(layoutData.CombineWith( CreateLabelingLayoutData( graphControl.Graph, LabelPlacementAlongEdgeItem, LabelPlacementSideOfEdgeItem, LabelPlacementOrientationItem, LabelPlacementDistanceItem ) )); }