Description
It would be a great enhancement to add Undo/Redo (Ctrl+Z / Ctrl+Y) support to the ktsu.ImGui.NodeEditor. Currently, managing mutations and accidental edits in complex node graphs can be difficult for users without a history stack.
Proposed Solution
Implementing a history/command pattern or snapshot system that tracks common graph state mutations, including:
- Node Operations: Adding, deleting, and duplicating nodes.
- Connection Operations: Creating or destroying edges/links between sockets.
- Transformations: Dragging/moving node positions.
- Data Mutations: Internal property changes within custom nodes (if applicable).
Additional Context
Since ktsu.ImGui.NodeEditor utilizes ForceDirectedLayout for graph simulations, the Undo/Redo stack might need to smoothly restore layout states or snapshot node positions efficiently.
Are there any existing plans or architectural preferences (e.g., Command Pattern vs. State Snapshots) for introducing history management to this library? I'd love to hear your thoughts!
Description
It would be a great enhancement to add Undo/Redo (Ctrl+Z / Ctrl+Y) support to the
ktsu.ImGui.NodeEditor. Currently, managing mutations and accidental edits in complex node graphs can be difficult for users without a history stack.Proposed Solution
Implementing a history/command pattern or snapshot system that tracks common graph state mutations, including:
Additional Context
Since
ktsu.ImGui.NodeEditorutilizesForceDirectedLayoutfor graph simulations, the Undo/Redo stack might need to smoothly restore layout states or snapshot node positions efficiently.Are there any existing plans or architectural preferences (e.g., Command Pattern vs. State Snapshots) for introducing history management to this library? I'd love to hear your thoughts!