public readonly record struct NodeLayoutOptionsHow much room an automatic layout leaves.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
⚠ The four size numbers are the view's, restated. A layout that assumed every node was the same height puts a two-port node and a twelve-port one on the same pitch, so the columns either overlap or are mostly air. They are parameters rather than read from a canvas because this runs against a model with no view attached — which is what makes it testable against coordinates rather than against a screenshot — and NodeGraphView passes its own.
Fields and properties (8)
public Vector2 OriginWhere the leftmost column's left edge goes.
public float ColumnGapHow much clear space is left between one column and the next.
public float RowGapAnd between one node and the one under it.
public float NodeWidthHow wide a node is taken to be.
public float HeaderHeightHow tall its title bar is.
public float PortPitchHow far apart its ports are.
public float PaddingHow much room is left under its last port.
public static NodeLayoutOptions DefaultWhat a view with the stock theme would use.
Methods (2)
public NodeLayoutOptions(Vector2 Origin = default(Vector2), float ColumnGap = 80, float RowGap = 24, float NodeWidth = 160, float HeaderHeight = 22, float PortPitch = 18, float Padding = 6)How much room an automatic layout leaves.
public float HeightOf(int rows)How tall a node with a given number of port rows is.
Used by (4)
- LayoutCommandVixen.Editor.NodeGraph
- LayoutTestsVixen.Editor.NodeGraph.Tests
- NodeGraphLayoutVixen.Editor.NodeGraph
- NodeGraphViewVixen.Editor.NodeGraph