Loading state
Loading state
This section describes loading a dock layout.
onDidLayoutFromJSON | Invoked after a layout is deserialzied using the fromJSON method.
|
|---|---|
fromJSON | Create a component from a serialized object.
|
Load a layout
To load a layout you should pass a valid object to fromJSON. If you try to load an invalid or corrupted layout Dockview will throw an error and reset gracefully, ready
for another attempt with a valid object.
You could load a previously saved layout from local storage for example.
See also
- Saving state: serialize the current layout with
toJSON. - Layout history: undo and redo layout changes without reloading from JSON.