Represents a grid-like layout.
Namespace: MindFusion.Dashboards
File: GridLayout.js
SyntaxJavaScript
Copy Code
|
|---|
// class |
RemarksGridLayout is the default layout engine in MindFusion.Dashboards. It arranges widgets in a structured, responsive 2D matrix of uniform columns and rows.
Key configuration properties of GridLayout:
Widgets are positioned in the grid using GridArea instances, which specify the starting column index, starting row index, columnSpan, and rowSpan. A widget with a columnSpan of 2 and rowSpan of 2 occupies a 2x2 cell block in the matrix.
In DashboardMode.Edit, unoccupied cells are rendered as empty drop targets with dashed borders. Clicking an occupied container highlights it with a focus ring and updates the activeContainer property, loading its properties into the designer's PropertyGrid. Dragging a card by its body moves it across cells, while dragging edge and corner handles resizes the cell span.
Calling toJson serializes the container coordinates and widget identifiers, which fromJson restores during layout rehydration.
Inheritance HierarchyMindFusion.Dashboards.LayoutBase
MindFusion.Dashboards.GridLayout
See Also