Failure to validate parts

Hi, While evaluating goJS, I am getting this message in the controll, What is the problem root?


Could you tell us more? What hardware, software, browser? What was the user doing at the time? A screenshot would be helpful too.

Hi @giladfit, we would really like to reproduce this issue if you found a way to get that message in the console. Can you show us how?

I am also getting same issue. This is my console output:

Actually I trying acheive straight line between the nodes where nodes locationSpot is not in go.Spot.Center mean each Nodes having multiple ports(more than 6) and also I am using go.Link.Avoidnodes.

I am overriding the go.Link.computePoints(). In this method, after some calculation I am setting toNode port location to fromNode port x/y position to achieve the straight line between the nodes.

Moving nodes or ports in an override of Link.computePoints (or any of the other protected methods called when computing a route or a geometry) could easily cause that error.

It sounds like you should not be using multiple ports at all. Could you provide a sketch or screenshot of an ideal result that you are trying to achieve – not what you are trying to do that is causing problems?

Here I am trying to achieve a straight line between the two node port’s.

Problem arising at this scenario

In overrided computePoints method, I am using this line
this.toNode.location = SnapObjectsToStraight(this.fromNode, this.fromPort, this.toNode, this.toPort)

Due to this make those warnings

If you want to move nodes automatically, you should customize the Diagram.layout, not the computation of any link route.

How are you going to handle two links connecting different pairs of ports on the same two nodes? Unless the distance between the ports is exactly the same on both nodes, the links will not be parallel to each other.

Are you sure that you want to have distinct ports at all? What if you customized the link route computation so that it always went straight to somewhere/anywhere at the edge of the nodes?

There are several examples of this – look for overrides of Link.getLinkPoint in the samples:

And there’s yet another possibility – using an undocumented Link.routing option: go.Link.AvoidsNodesStraight. Link connection points

I am trying to achieve a straight line between the port’s like above (It will automatically finds toNode port’s position and make link straight).
I understand that this one will work only for the nodes which as Go.Spot.Center locationspot.

In my scenario, locationSpot will not be at Spot.Center always.

For this case I think I need to override the go.DraggingTool.computeMove to locate the position.

I need to write custom Layout or DraggingTool.computeMove?

If you want the alignment to happen automatically when the user drags nodes, that’s OK. You didn’t specify the situation(s) in which you wanted to move nodes into alignment – I had thought that it should happen when the user drew a new link between nodes.

Note that the extensions/GuidedDraggingTool.js implements something very much like what I think you are suggesting. Try the Guided Dragging sample.

Actually I trying to achieve two things:

First : What I have sended in gif above.

Second: What you have mentioned above, < I had thought that it should happen when the user drew a new link between nodes.> When the user draws a links between the nodes then it automatically moves toNode to horizontal/vertical of fromNode port to achieve straight line.

OK, for the dragging-a-node case, you know about extensions/GuidedDraggingTool.js, which you can simplify for your own needs.

If you don’t want to bother with a custom DraggingTool, you could instead just implement a “SelectionMoved” DiagramEvent listener that adjusts each Node in the e.diagram.selection so that it lines up the way that you want, based on the Nodes that they are linked with. However, a custom dragging tool will allow you to show feedback during the drag.

And for the draw-a-new-link case, you can implement a “LinkDrawn” DiagramEvent listener that looks at the new Link (which will be e.subject), and decides whether to move the Link.fromNode or Link.toNode and how much.