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
Connections - Editing
Drag to Connect
Click to Connect
Drag to Reassign
Create Node on Connection Drop
Remove Connection on Drop
Assign Node to Connection on Drop
Auto Snap
Connections - Appearance
Connection Types (Straight, Segment, Bezier, Adaptive Curve)
Custom Connection Type
Connection Behaviours
Connection Markers
Connection Content
Connection Gradients
Connections - Routing
Connection Waypoints
Connection Connectable Side
Viewport
Minimap
Zoom
Initial View
New
Background
Auto Pan
Canvas Layer Ordering
Editor Helpers
Selection Area
Magnetic Lines
Magnetic Rects
Grid System
Add Node from Palette
Accessibility
Layout Engines
Dagre Layout
Dagre Auto Layout
ELK.js Layout
ELK.js Auto Layout
Reflow
Reflow on Resize
Editor State
Cut/Copy/Paste
State
New
Events
Drag Start/End Events
Custom Event Triggers
Control Schemes
Performance
Large Scene Performance
Connection Redraw Performance
Reference Apps
AI Low-Code Platform
Schema Designer
Call Center Flow
Marketing Automation
UML Diagram
Tournament Bracket
Foblex Flow

Initial View

Description

By default a flow paints as soon as Angular renders it — at the default position and scale — and only then your (fFullRendered) handler fits or centers it. The viewport visibly jumps from the top-left corner to the fitted view.

The initial view feature removes that jump: the flow renders invisibly (layout and measurements still happen), your handler sets the viewport up, and the flow is revealed only after the transform has been applied. The first visible frame already shows the fitted view.

Two ways to enable it:

  • the fInitialView input on f-flow:
  • or the withInitialView() feature, when you already configure the flow through providers:

When the input is bound it takes priority over the provider feature in both directions — [fInitialView]="false" turns the feature off even when withInitialView() is registered.

The hook stays the same (fFullRendered) output you already use:

Notes

  • Call the viewport methods with animated: false — the reveal then shows the final state. With an animated call the flow is revealed at the start of the animation.
  • Without a handler the flow is simply revealed right after the first full render.
  • The reveal happens once; later data changes render as usual.
  • Large graphs rendered progressively stay invisible until the full render completes — that is the trade-off this feature opts into.

Example

Press Replay to re-create the flow and see it appear already fitted — no jump from the default viewport.

[example.html] <<< https://raw.githubusercontent.com/Foblex/f-flow/main/libs/f-examples/extensions/initial-view/example.html [example.ts] <<< https://raw.githubusercontent.com/Foblex/f-flow/main/libs/f-examples/extensions/initial-view/example.ts [example.scss] <<< https://raw.githubusercontent.com/Foblex/f-flow/main/libs/f-examples/extensions/initial-view/example.scss

Related docs

Edit this page on GitHub