Foblex Flow
Introduction
Overview
Nodes
Custom Nodes
Drag Handle
Node Selection
Resize Handle
Rotate Handle
Grouping
Drag to Group
Connectors
Node as Connector
Connector Inside Node
Connector Outlet
Limiting Connections
Connection Rules
Connectable Side
Updated
Connections
Drag to Connect
Drag to Reassign
Create Node on Connection Drop
Remove Connection on Drop
Assign Node to Connection on Drop
Auto Snap
Connection Types (Straight, Segment, Bezier, Adaptive Curve)
Custom Connection Type
Connection Behaviours
Connection Markers
Connection Content
New
Connection Waypoints
New
Custom Connections
Connection Connectable Side
New
Extensions
Add Node from Palette
Selection Area
Help in Positioning (Legacy)
Deprecated
Magnetic Lines
New
Magnetic Rects
New
Grid System
Minimap
Zoom
Updated
Background
Updated
Advanced
Large Scene Performance
Updated
Connection Redraw Performance
Updated
Cut/Copy/Paste
New
Undo/Redo
Undo/Redo V2
New
Dagre Layout (Directed Graph)
ELKJS Layout (Directed Graph)
Drag Start/End Events
Custom Event Triggers
Reference Apps
AI Low-Code Platform
New
DB Management
UML Diagram
Tournament Bracket
Foblex Flow

Undo/Redo

Description

This example demonstrates how to implement undo and redo functionality in a flow-based diagram. Undo and redo let users revert accidental changes, compare alternatives, and explore graph edits without fear of losing work.

If you are building a serious editor, history is not optional. It is one of the strongest signals that the interface is ready for repeated daily use instead of being only a demo.

Even a simple history model can dramatically improve trust in the editor and reduce user hesitation. That is why it is one of the first production features many teams add.

Example

[component.html] <<< https://raw.githubusercontent.com/Foblex/f-flow/main/projects/f-examples/advanced/undo-redo/undo-redo.component.html [component.ts] <<< https://raw.githubusercontent.com/Foblex/f-flow/main/projects/f-examples/advanced/undo-redo/undo-redo.component.ts [component.scss] <<< https://raw.githubusercontent.com/Foblex/f-flow/main/projects/f-examples/advanced/undo-redo/undo-redo.component.scss [common.scss] <<< https://raw.githubusercontent.com/Foblex/f-flow/main/projects/f-examples/_flow-common.scss

What this solves

  • Revert node moves and connection changes.
  • Make experimentation safe for end users.
  • Provide a cleaner foundation for richer editor tooling later.

If your users edit flows repeatedly during the day, undo/redo quickly moves from “nice to have” to required product behavior.

Related examples

Edit this page on GitHub