Documentation
¶
Overview ¶
Package layout is the port through which the workspace graph is placed for drawing. The engine asks a Layout where each node goes and every interface draws what it is told, so the graph looks the same in each; the force adapter beside this package is the one implementation today.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Layout ¶
type Layout interface {
// Place returns one point per node, in the order of nodes.
Place(nodes []Node, edges []Edge) []Point
}
Layout places a graph. The same nodes and edges in the same order are always placed the same way, so a graph asked for twice, or by two interfaces, is drawn alike.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package conformance is what every layout.Layout must do: place every node somewhere finite, the same way every time, keep what is connected nearer than what is not, and keep a group together.
|
Package conformance is what every layout.Layout must do: place every node somewhere finite, the same way every time, keep what is connected nearer than what is not, and keep a group together. |
|
Package force is a force-directed Layout: edges are springs, nodes push apart at short range, and each group drifts towards its own place on a ring, so the same kinds gather and a node sits between what it connects.
|
Package force is a force-directed Layout: edges are springs, nodes push apart at short range, and each group drifts towards its own place on a ring, so the same kinds gather and a node sits between what it connects. |
|
Package layered is a Layout for a directed acyclic graph: each group is a layer, drawn as a band from the top down in the order the engine numbers them, so every edge runs from a band to one above it or along its own.
|
Package layered is a Layout for a directed acyclic graph: each group is a layer, drawn as a band from the top down in the order the engine numbers them, so every edge runs from a band to one above it or along its own. |
Click to show internal directories.
Click to hide internal directories.