BitQuirky.Graph.GraphView.ViewModels
Public bit quirky graph: editor symbols in BitQuirky.Graph.GraphView.ViewModels.
Source snapshot ad0983d00d77.
On this page
Assembly: BitQuirky.Graph.GraphView.Editor
GraphViewModel
Section titled “GraphViewModel”Category: Low-level runtime
class BitQuirky.Graph.GraphView.ViewModels.GraphViewModelSource declaration: ../bitquirky-graph/Editor/GraphView/ViewModels/GraphViewModel.cs:11-28
The document a canvas renders: the graph itself plus the viewport and node positions that belong to the view rather than to the model.
Members
Section titled “Members”public BitQuirky.Graph.GraphDefinition Graph { get; set; }Source declaration: ../bitquirky-graph/Editor/GraphView/ViewModels/GraphViewModel.cs:14
The graph being rendered.
Layout
Section titled “Layout”public BitQuirky.Graph.GraphView.ViewModels.LayoutState Layout { get; set; }Source declaration: ../bitquirky-graph/Editor/GraphView/ViewModels/GraphViewModel.cs:16
Node positions and the viewport. The canvas writes pan, zoom, and dragged positions back into this object.
GraphViewModel(GraphDefinition graph, LayoutState layout)
Section titled “GraphViewModel(GraphDefinition graph, LayoutState layout)”public GraphViewModel(BitQuirky.Graph.GraphDefinition graph, BitQuirky.Graph.GraphView.ViewModels.LayoutState layout = null)Source declaration: ../bitquirky-graph/Editor/GraphView/ViewModels/GraphViewModel.cs:23-27
Wrapsgraph for rendering, with layoutsupplying
remembered node positions and viewport; null for either installs an empty one, so the
canvas opens on a blank graph or an unpositioned one rather than failing.
LayoutState
Section titled “LayoutState”Category: Low-level runtime
class BitQuirky.Graph.GraphView.ViewModels.LayoutStateSource declaration: ../bitquirky-graph/Editor/GraphView/ViewModels/LayoutState.cs:14-30
The view-only arrangement of a graph: where each node sits and where the reader is looking. Held alongside the graph so a host can persist and restore it without touching the model.
Members
Section titled “Members”public UnityEngine.Vector2 Pan { get; set; }Source declaration: ../bitquirky-graph/Editor/GraphView/ViewModels/LayoutState.cs:20
Viewport offset in pixels applied before zoom.
PinnedNodes
Section titled “PinnedNodes”public System.Collections.Generic.HashSet<System.Guid> PinnedNodes { get; set; }Source declaration: ../bitquirky-graph/Editor/GraphView/ViewModels/LayoutState.cs:29
Nodes whose positions are absolute (user-authored) rather than derived from an automatic layout basis. Explicit host auto-layout operations keep these entries exactly where the supplied layout placed them; geometry changes never move nodes.
Positions
Section titled “Positions”public System.Collections.Generic.Dictionary<System.Guid, UnityEngine.Vector2> Positions { get; set; }Source declaration: ../bitquirky-graph/Editor/GraphView/ViewModels/LayoutState.cs:18
Graph-space top-left position of each node, keyed by node id. Nodes missing from the map keep whatever position they were rendered at.
public float Zoom { get; set; }Source declaration: ../bitquirky-graph/Editor/GraphView/ViewModels/LayoutState.cs:22
Viewport scale factor; 1 renders the graph at its authored size.
Source fingerprint: sha256:ad0983d00d773d882bc61865e18d8c5559e009d181e5891575cd7f262515b23e