有关于线条路径会错误的问题

我参照官网例子做了一个简单的效果,但是我发现会出现图中的问题,我该怎么设置,才能让路劲朝着正确方向走,打X的是错误的,打√的才是正确的

I’m assuming you started from the Data Flow sample, Data Flow Diagram.

Note how in that sample all of the ports are defined with GraphObject.fromSpot and GraphObject.toSpot values that are appropriate for the side that the port is on.

But note also that that sample assumes that all links are going from a port on the right side of a node to a port on the left side of a node. In your example of the “UL” port on the bottom right “Join” node, the link appears to be going “to” an output-only port. That’s OK, but then you need to make sure that you set both the fromSpot and the toSpot of every port appropriately.

谢谢沃尔特,我意识到自己的错误了