Drag nodes into groups in Foblex Flow, create nested hierarchies, and build dynamic structures with auto-sizing, padding, and drop events in Angular.
This example shows how elements (nodes or groups) can be grouped simply by dragging them into containers. It demonstrates a flexible approach to building hierarchical structures in Foblex Flow, where groups can contain groups, and nodes can be nested inside groups or even other nodes.
The only restriction is that groups cannot be placed inside nodes, ensuring a consistent parent–child model.
You can also create new nodes directly inside a container by dragging them from an external palette using the fExternalItem directive.
The example introduces key behaviors such as respecting padding boundaries (fIncludePadding), automatically resizing groups to fit their children (fAutoSizeToFitChildren), and expanding groups on collision with children (fAutoExpandOnChildHit).
Events:
[component.html] <<< https://raw.githubusercontent.com/Foblex/f-flow/main/projects/f-examples/nodes/drag-to-group/drag-to-group.component.html [component.ts] <<< https://raw.githubusercontent.com/Foblex/f-flow/main/projects/f-examples/nodes/drag-to-group/drag-to-group.component.ts [component.scss] <<< https://raw.githubusercontent.com/Foblex/f-flow/main/projects/f-examples/nodes/drag-to-group/drag-to-group.component.scss [common.scss] <<< https://raw.githubusercontent.com/Foblex/f-flow/main/projects/f-examples/_flow-common.scss