foundation-layout.foundationlayout
Home > @genesislcap/foundation-layout > FoundationLayout
FoundationLayout class
Top level web component which is used to initialise a custom layout
Signature:
export declare class FoundationLayout extends FoundationElement implements LayoutComponent
Extends: FoundationElement
Implements: LayoutComponent
Remarks
Can be used in a composition to customise the styles of the layout.
The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the FoundationLayout
class.
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
autoSaveKey? | string | (Optional) Attribute which if set will auto save and load the layout as the user changes it. Omit this attribute to disable this feature. Set attribute using auto-save-key . | |
dragging | boolean | Set to true when the user is currently dragging the panes inside of the layout | |
missingItemPlaceholder | (missingItem: string) => string | Function which is used to generate the placeholder text when a layout is loaded with a missing item. | |
reloadBuffer | number | Number describing how long to wait in ms before reloading the config when adding items declaratively by the html API. Default 500 (ms). |
Methods
Method | Modifiers | Description |
---|---|---|
addItem(config, placement) | Dynamically add a new item to the layout. The user can move the new plane to whenever they want once it has been added. | |
getLayout() | Gets a minified string containing the config describing the current layout of the layout object to later restore in function | |
layoutRequiredRegistrations(layout) | static | Gets all of the required registration function names for a set of config |
loadLayout(layout, handleMissingItem) | Restores a layout described in the config from getLayout() | |
registeredItems() | Gets all of the currently registered names | |
registerItem(registration, elements) | Register a collection of Element and associate them with an ID with the layout system for later use. | |
tryLoadLayoutFromLocalStorage() | Try to load a layout from local storage, or return false. Only required if manually calling |