Overview
TheAppManager component provides centralized access to global application state and UI grid management. It extends the @thatopen/components base component system to manage viewport grids and other application-wide resources.
Class Definition
src/bim-components/AppManager/index.ts:5
Properties
Static UUID identifier for the component:
"939bb2bc-7d31-4a44-811d-68e4dd286c35"Flag indicating whether the component is active
Map storing named references to UI Grid components throughout the application. Keys are string identifiers (e.g., “viewport”), values are
BUI.Grid instances.Usage
Accessing the AppManager
TheAppManager is registered with the components system and can be retrieved using the standard components.get() method:
src/main.ts:65
Registering UI Grids
Store references to important UI grids for application-wide access:src/main.ts:66-67
Retrieving Stored Grids
Integration Example
Complete example from the main application initialization:Use Cases
- Centralized Grid Management: Store and retrieve UI grid references across different modules
- Global State Access: Provide a single source of truth for application-wide settings
- Component Communication: Enable different parts of the application to access shared resources
- Layout Management: Dynamically switch between different viewport layouts
Dependencies
@thatopen/components- Base component system@thatopen/ui- UI grid components
Related Components
- ChatGpt - AI integration component
- LoadIfcFile - IFC file loading component
- ChartData - Building analytics component