@geogirafe/lib-geoportal
Version:
GeoGirafe is a flexible application to build online geoportals.
18 lines (17 loc) • 844 B
TypeScript
import IGirafeContext from '../../context/icontext.js';
import { IBrainSerializer } from '../../state/brain/serialize.js';
import LayoutState, { CellContent, LayoutType } from '../../state/layout.js';
export default class LayoutSerializer implements IBrainSerializer<LayoutState> {
private readonly context;
constructor(context: IGirafeContext);
private get layout();
brainSerialize(layout: LayoutState): string;
brainDeserialize(str: string): void;
/**
* Applies a layout to the state, ignoring the values that are not valid anymore.
* A shared state can have been created by another version of the application,
* in which other components or other layouts were available.
*/
applyLayout(type: LayoutType, cells?: CellContent[], sizes?: LayoutState['sizes']): void;
private getValidSizes;
}