Quantcast
Channel: GoJS - Northwoods Software
Viewing all articles
Browse latest Browse all 7069

The ForceDirectedLayout will not be able to save the location of the manual drag node after the automatic layout

$
0
0

@Jane wrote:

(1)

layout: $(go.ForceDirectedLayout,
  {
      // isInitial: false,
      // isOngoing: false,
      //Edge Properties
      defaultSpringLength:1,
      defaultSpringStiffness:0.05,
      //Vertex Properties
      defaultElectricalCharge:150,
      defaultGravitationalMass:0,
      //ForceDirectedLayout Properties
      epsilonDistance:1,
      infinityDistance:1000,
      maxIterations:100,
      arrangementSpacing:new go.Size(100,100)
  }),

After using the ForceDirectedLayout to complete the automatic layout, then manually layout, drag the LC2 node to the desired location

After saving and loading, the value of loc in json has not changed, but the location of LC2 in the diagram has been changed by the ForceDirectedLayout

http://gojs.net/latest/api/symbols/Layout.html#invalidateLayout
If I set both isInitial and isOngoing to false, there will be automatic layout invalidation...

(2)

http://gojs.net/latest/samples/fdLayout.html
What is Edge Properties?The edge of the node?Is it the edge of the visible diagram?
What is Vertex Properties?The properties of the node?What exactly is defaultElectricalCharge and defaultGravitationalMass in the figure above?
How does epsilonDistance, infinityDistance, maxIterations, and arrangementSpacing appear in the figure above?
http://gojs.net/latest/api/symbols/ForceDirectedLayout.html
Does the iteration mean the overlap of the nodes in the diagram?
I really don't understand the API of ForceDirectedLayout...

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 7069

Trending Articles