Link points change after moving or creating a (specific) node

Hi,

I’m experiencing some strange behaviour regarding link points.

I have a diagram with several nodetypes:

  • nodes that display information (lets call them objects)
  • nodes only for drawing purposes (they are created with the dragcreatetool, lets call them shapes)
  • textblocks for displaying text
  • groups

Only objects can have links (to other objects)
The points of the links are saved so the user can reshape links the way they want.

The behaviour i’m experiencing is that when i create or edit a shape or textblock, the link points (of multiple links) are changed and the link appears somewhere else on the diagram, detached from the from and to objects.

I hope someone can help me troubleshooting this one, i could post some code but it’s quite a lot, so it’s best to ask for specific parts of the code i guess.

EDIT
It seems there is something weid going on in my code that messes with the points array. So first i’ll have to try to find where the points get messed up. On loading the right coordinates get loaded but after creating the diagram the points get changed, somehow…

EDIT 2
Haven’t found the problem, but it looks like updating go js from version 1.5.2 to 1.5.7 solved the problem, haven’t been able to reproduce it since i updated

Really? That’s good, but that’s bad too, because I cannot think of any change that has happened in version 1.5 that would account for such changes in behavior.

Haha, exactly my thoughts. but it really seems like its fixed now. in a couple of days we’ll start testing, i’ll let you know the outcome

Hi Walter,

So, the upgrade didn’t fix it, but i did find the source of the problem.

The diagram (sometimes) rendered to soon, so it could be a size of 0*0 pixels, and for some reason the points array would fill up with incorrect values. Later when the diagram had a new size, everything would be drawn correctly, but when it was saved and reloaded (without doing anything) the new (and incorrect) points would be saved

Just in case you or someone else reading this hadn’t seen this page, I’ll mention:
http://gojs.net/latest/intro/resizing.html