void AlignFellowTravellers() { if (NodesInBadPosition()) { ParentControl.GetBounds().AlignLabelsToPoint(this.Position, FellowTravellers.OfType <DragThumb>().Select(t => t.DraggedControl).OfType <Node>()); foreach (DragThumb fellowTraveller in FellowTravellers) { DragThumb.UpdatePos(fellowTraveller); } } }
/// <summary> /// Resets the labels positions. /// </summary> public void ResetLabelsPositions() { if (Junction != null) { IConnectable junctionElement; if (Junction.StartPoint == this) { junctionElement = (IConnectable)Junction.SourceElement; } else { junctionElement = (IConnectable)Junction.TargetElement; } junctionElement.GetBounds().AlignLabelsToPoint(this.Position, FellowTravellers.OfType <AssociationLabel>()); } }