ModelChanged listener behavior

I add ModelChangedListener to diagram to watch for some property change and regarding that took some actions. I’m a little bit confused that change of text property of node causes change in point property of links connected with that node. Visually there is no change in diagram regarding a links but this listener tells me that point also changed. Is this some kind of bug in GoJS or there is some reason for this kind of behavior?

Just in case the node changes size, it invalidated the routes of all connected links, and the link routes were recomputed, updating the Link.points property.

We have optimized that in version 1.7, which you can try at http://gojs.net/beta. But in general it is impossible to be perfectly prescient about only invalidating link routes if their routes really will change, so there always might be some unnecessary side-effects.

Yes that obvious and logical but in this case node geometry does not change at all. Only text inside of it is changing but that somehow effects the links. So all in all I can’t rely that point should not change if text of node is changed.

But you said that the Link.points list did not change values. That is the correct result, is it not? The only issue is that you are getting an unnecessary ChangedEvent, but it is one that you can decide to ignore.

Have you tried 1.7 beta to see if you do not get that ChangedEvent in that circumstance?

Well I tried with 1.7 beta and it works without triggering point property change when I’m changing text property!

Good. But remember that there may still be times when link routes are invalidated and the new route happens to be the same as the old one.