Exemple #1
0
        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);
                }
            }
        }
Exemple #2
0
 /// <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>());
     }
 }