Problem with self links drawing

Please look at screen shots below. I have a customized IconicNode and Labeled Link that is “looped” on the node. When draging node over diagram link by some reason recalculates its stroke. Link has AdjustingStyle Stretch as far as i understand it should not change its shape but one of “square” handles changes its position while the other remains positioned at the same point with respect to the position of node.
May be you give me some clue what is wrong?

I have copied the images to our web site and have edited your post accordingly.
If the user was resizing the link by dragging one of the two lower (middle) resize handles, then the behavior looks pretty good to me.
If that wasn’t what produced the second image, could you describe the actions more precisely please?

As i wrote “When draging node over diagram” no link handles used
to change link shape. The change happens during drag node operation.
And
i use 2.2 version. Of course this happens because of some of my node
and link customizations, for example i use RotatedGoText as link label
from one of posts in this forum and node has some elements added into
it (you can see small additional image in front of GoImage of the
node).
Nod also has two additional ports and so on. But main question is
why one of the “square” handles changes its position while node is
dragged.
I dont expect you to give me exact reason but probably if you analyze
the code that calculates left “square” handle position of bezier looped link
can give me a clue why it may happen.

Tnanks

By “draging node over diagram” do you mean just selecting the node and dragging it? Then the behavior ought to be as you expect–the link should drag along with the node, without changing its path.
This is the behavior you can see by running the StateCharter sample.
I also tested this when setting the GoLink.AdjustingStyle to Stretch, in case that made any difference. (In StateCharter the links have an AdjustingStyle of either Calculate or Scale.)
I wouldn’t think the type of the GoLabeledLink.MidLabel would matter either, although I haven’t tested that.

Yes exactly i mean just selecting the node and dragging it and i saw example you told.

below is the call stack that ends with StretchPoints - the function that changes coordinates of handle. As far as i understand Calculate stroke should not be called during node drag but it is called and link stroke calculates wrong.

ontos.lo4wg.ui.diagramview.objects.dll!Northwood s.Go.TheLink.StretchPoints(int startIndex = 0, System.Drawing.PointF newFromPoint = {X=5511.48242 Y=3284.10986}, int endIndex = 2, System.Drawing.PointF newToPoint = {X=5448.07715 Y=3331.74121}) Line 19 C#
northwoods.go.dll!Northwoods.Go.GoLink.AdjustPoi nts(int startIndex = 0, System.Drawing.PointF newFromPoint = {X=5511.48242 Y=3284.10986}, int endIndex = 2, System.Drawing.PointF newToPoint = {X=5448.07715 Y=3331.74121}) + 0xb8 bytes
northwoods.go.dll!Northwoods.Go.GoLink.Calculate Stroke() + 0xb5d bytes
northwoods.go.dll!Northwoods.Go.GoLink.OnPortCha nged(Northwoods.Go.IGoPort port = {Northwoods.Go.IconicNodePort}, int subhint = 1001, int oldI = 0, System.Object oldVal = , System.Drawing.RectangleF oldRect = {X=5460.86426 Y=3259.2395 Width=32.0 Height=32.0}, int newI = 0, System.Object newVal = , System.Drawing.RectangleF newRect = {X=5477.52979 Y=3237.0188 Width=32.0 Height=32.0}) + 0x1db bytes
northwoods.go.dll!Northwoods.Go.GoLabeledLink.On PortChanged(Northwoods.Go.IGoPort port = {Northwoods.Go.IconicNodePort}, int subhint = 1001, int oldI = 0, System.Object oldVal = , System.Drawing.RectangleF oldRect = {X=5460.86426 Y=3259.2395 Width=32.0 Height=32.0}, int newI = 0, System.Object newVal = , System.Drawing.RectangleF newRect = {X=5477.52979 Y=3237.0188 Width=32.0 Height=32.0}) + 0x60 bytes
northwoods.go.dll!Northwoods.Go.GoPort.LinksOnPo rtChanged(int subhint = 1001, int oldI = 0, System.Object oldVal = , System.Drawing.RectangleF oldRect = {X=5460.86426 Y=3259.2395 Width=32.0 Height=32.0}, int newI = 0, System.Object newVal = , System.Drawing.RectangleF newRect = {X=5477.52979 Y=3237.0188 Width=32.0 Height=32.0}) + 0x9d bytes
northwoods.go.dll!Northwoods.Go.GoPort.OnBoundsC hanged(System.Drawing.RectangleF old = {X=5460.86426 Y=3259.2395 Width=32.0 Height=32.0}) + 0x93 bytes
northwoods.go.dll!Northwoods.Go.GoObject.set_Bou nds(System.Drawing.RectangleF value = {X=5477.52979 Y=3237.0188 Width=32.0 Height=32.0}) + 0x114 bytes
northwoods.go.dll!Northwoods.Go.GoShape.set_Boun ds(System.Drawing.RectangleF value = {X=5477.52979 Y=3237.0188 Width=32.0 Height=32.0}) + 0x24 bytes
northwoods.go.dll!Northwoods.Go.GoGroup.MoveChil dren(System.Drawing.RectangleF old = {X=5457.55762 Y=3259.2395 Width=38.6132813 Height=47.0910645}) + 0x151 bytes
northwoods.go.dll!Northwoods.Go.GoGroup.OnBounds Changed(System.Drawing.RectangleF old = {X=5457.55762 Y=3259.2395 Width=38.6132813 Height=47.0910645}) + 0xa0 bytes
northwoods.go.dll!Northwoods.Go.GoObject.set_Bou nds(System.Drawing.RectangleF value = {X=5474.22314 Y=3237.0188 Width=38.6132813 Height=47.0910645}) + 0x114 bytes
northwoods.go.dll!Northwoods.Go.GoObject.set_Pos ition(System.Drawing.PointF value = {X=5474.22314 Y=3237.0188}) + 0x74 bytes
northwoods.go.dll!Northwoods.Go.GoNode.set_Locat ion(System.Drawing.PointF value = {X=5474.22314 Y=3237.0188}) + 0x104 bytes
northwoods.go.dll!Northwoods.Go.GoObject.DoMove( Northwoods.Go.GoView view = {Northwoods.Go.GoDiagram}, System.Drawing.PointF origLoc = {X=5457.55762 Y=3259.2395}, System.Drawing.PointF newLoc = {X=5474.22314 Y=3237.0188}) + 0x50 bytes
northwoods.go.dll!Northwoods.Go.GoView.MoveSelec tion(Northwoods.Go.GoSelection sel = {Northwoods.Go.GoSelection}, System.Drawing.SizeF offset = {Width=16.6655273 Height=-22.2207031}, bool grid = false) + 0x45c bytes
northwoods.go.dll!Northwoods.Go.GoToolDragging.D oDragging(Northwoods.Go.GoInputState evttype = Continue) + 0x232 bytes
northwoods.go.dll!Northwoods.Go.GoToolDragging.D oMouseMove() + 0xfc bytes
northwoods.go.dll!Northwoods.Go.GoView.DoMouseMo ve() + 0x24 bytes
northwoods.go.dll!Northwoods.Go.GoView.DoInterna lDrag(System.Windows.Forms.DragEventArgs evt = {System.Windows.Forms.DragEventArgs}) + 0x16 bytes
northwoods.go.dll!Northwoods.Go.GoView.OnDragOve r(System.Windows.Forms.DragEventArgs evt = {System.Windows.Forms.DragEventArgs}) + 0x150 bytes

I’m sorry, but despite trying a lot of situations, I am unable to reproduce the behavior you see.
Did you customize how the port calculates the link points, where each link connects to the port? Here’s the relevant code from GoLink.OnPortChanged:
GoPort p = port.GoObject as GoPort;
if (p != null && p == this.ToPort && this.PointsCount >= 2) {
// get the last point
PointF toPoint = p.GetToLinkPoint(this.AbstractLink);
PointF lastPoint = GetPoint(this.PointsCount-1);
if (!IsApprox(toPoint.X, lastPoint.X) || !IsApprox(toPoint.Y, lastPoint.Y)) {
CalculateStroke();
}
}
If for some reason the result of GoPort.GetToLinkPoint isn’t very close to the link’s corresponding end point, then it figures it needs to call CalcuateStroke(). (The above code is actually repeated for the “FromPort” end of the link too.)