Foblex Flow
Introduction
Overview
Nodes
Custom Nodes
Drag Handle
Node Selection
Resize Handle
Updated
Grouping
Drag to Group
Stress Test
Stress Test with Connections
Connectors
Node as Connector
Connector Inside Node
Connector Outlet
Limiting Connections
Connectability Check
New
Connectable Side
Connections
Drag to Connect
Drag to Reassign
Create Node on Connection Drop
Remove Connection on Drop
Assign Node to Connection on Drop
Updated
Auto Snap
Updated
Connection Types
Custom Connection Type
Connection Behaviours
Connection Markers
Connection Text
New
Connection Center
New
Custom Connections
Extensions
Add Node from Palette
New
Selection Area
Help in Positioning
Grid System
Updated
Minimap
Zoom
Updated
Background
Advanced
Undo/Redo
New
Dagre Layout
ELKJS Layout
Drag Start/End Events
New
Custom Event Triggers
New
Pro Examples
Visual Programming
DB Management
UML Diagram
Tournament Bracket
Foblex Flow
DocsExamples

Adding a Node from the Palette

Description

This guide shows how to add fNode to the f-canvas using the fExternalItem directive. The directive allows placing elements outside the f-canvas and moving them onto it. It supports features like Preview and Placeholder elements to manage the visual representation during interactions. External items can be dragged onto the f-canvas while preserving predefined parameters using the fData attribute.

Directive Features

  • fExternalItem — links an element to the canvas, enabling movement and integration into the overall structure.
  • fPlaceholder and fPreview — provide mechanisms to add placeholder and preview elements.
  • fPreviewMatchSize — synchronizes the size of the fExternalItem with its preview to ensure consistent display.

Example

[component.html] <<< https://raw.githubusercontent.com/Foblex/f-flow/main/projects/f-examples/extensions/add-node-from-palette/add-node-from-palette.component.html [component.ts] <<< https://raw.githubusercontent.com/Foblex/f-flow/main/projects/f-examples/extensions/add-node-from-palette/add-node-from-palette.component.ts [component.scss] <<< https://raw.githubusercontent.com/Foblex/f-flow/main/projects/f-examples/extensions/add-node-from-palette/add-node-from-palette.component.scss [common.scss] <<< https://raw.githubusercontent.com/Foblex/f-flow/main/projects/f-examples/_flow-common.scss