Links disappear after after changing segmentOffset, fromShortLength and toShortLength

Here is the scenario:

  • Create diagram using GraphLinksModel
  • Add nodes and links
  • When select a node update fromShortLength and toShortLength and segmentOffset of fromArrow and toArrow shapes for all connected links using findLinksInto and findLinksOutOf. Also undo changes for the nodes that get unselected using findLinksConnected
  • After all changes do
    setTimeout(() => {
    for (const link of links) {
    link.invalidateRoute();
    }
    });
  • Works good so far
  • Move some connected nodes. Sometimes links disappear on undo/redo
  • When hover over the invisible link or node or move node the links appear back

We’re investigating this one.

We’ve got a fix for this, which will come with the next release. You shouldn’t need to call invalidateRoute manually to get the links to update. The issue was that setting fromShortLength or toShortLength wasn’t invalidating the link’s geometry since all the points remain the same.

Thank you. When are you planing to have this release?

It should be within the next week.

Thank you very much

We just released 1.8.21 which should resolve the issue with fromShortLength/toShortLength.

Thank you!