pub fn commit_layout(
registry: &mut Registry,
timestamp: Timestamp,
head: &mut Head,
live: &SceneView,
) -> Option<CommitAddr>Expand description
Commit the current layout as a new commit on the head’s existing graph
when node positions have changed since the head commit’s frozen baseline
view, advancing head to the new commit.
The graph content is unchanged, so the new commit reuses the head’s
gantz_ca::GraphAddr: the registry dedups the graph (the graph closure
passed to gantz_ca::Registry::commit_graph_to_head is never called) and
the VM does not need to recompile. Only layout (node positions) is
compared; the camera is excluded, so camera pan/zoom never produces a
layout commit.
Returns the new commit address when a layout commit was created, else None
(no baseline view yet - i.e. the head commit’s view section entry has not
been seeded - or no node-position change). Seeding the new commit’s view,
clearing the redo stack and migrating GUI state stay with the caller.