Moving link even at last or first section

<> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin-top:0cm; mso-para-margin-right:0cm; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0cm; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin;}

<![endif]–>

Hi guys,

We are using
GoDiagram v3.0.3.3, with .Net 3.5 SP 1 (C# only).<o:p></o:p>

GoDiagram's link permits to move a part of a link which is between two points which are not final and/or beginning of the link (look at 1 in provided screenshot). We want to give the opportunity to user to do the same event for final and/or beginning part of link, either vertically or horizontally (place 2 and 3 in provided screenshot).

This means we will have to add points on the fly in the link, but we experienced serious difficulty about that, especially for the first point (apparently, the GoStroke/GoLink does not appreciate when the order of point is modified during some action).

We were thinking it was a simple modification, but now we think we need to almost totally overcome the behavior of GoLink (especially toward behavior of selected handler). Before beginning this work estimated to 4-5/man-days, we would like you to confirm serious override of GoLink is needed to achieve such goal.

Changing the very first or last points might be difficult, depending on the nature of the GoPort’s determination of where the link is supposed to terminate.

However, you could easily add one or two points at index 2 and at index .PointsCount-2.

[code] public override void CalculateStroke() {
base.CalculateStroke();
int num = this.PointsCount;
if (num < 4) return;

  PointF a = GetPoint(num-1);
  PointF b = GetPoint(num-2);
  PointF c = GetPoint(num-3);
  if (a.X == b.X) {
    InsertPoint(num-2, b);
    if (b.X != c.X) InsertPoint(num-2, b);
  } else if (a.Y == b.Y) {
    InsertPoint(num-2, b);
    if (b.Y != c.Y) InsertPoint(num-2, b);
  }

  a = GetPoint(0);
  b = GetPoint(1);
  c = GetPoint(2);
  if (a.X == b.X) {
    InsertPoint(2, b);
    if (b.X != c.X) InsertPoint(3, b);
  } else if (a.Y == b.Y) {
    InsertPoint(2, b);
    if (b.Y != c.Y) InsertPoint(3, b);
  }
}[/code]

Although I think this does what you want for the common cases, it might not handle more complicated ones.

Thanks, it seem to run.