UNPKG

@zeplin/extension-model

Version:

Models exposed to Zeplin extensions

36 lines (35 loc) 988 B
import { LayerConstraint } from "./layerConstraint.js"; /** * Interface for layer constraints data */ export interface LayerConstraintsData { horizontal: LayerConstraint; vertical: LayerConstraint; relativeTo: string; } /** * An interface to represent the LayerConstraints of {@link Layer} */ export declare class LayerConstraints { /** * Horizontal constraint of the layer. */ horizontal: LayerConstraint; /** * Vertical constraint of the layer. */ vertical: LayerConstraint; /** * The source id of the reference layer of the constraints. */ relativeTo?: string; static get ALLOWED_FIELDS(): string[]; constructor(layerConstraintsData: LayerConstraintsData); /** * Creates a LayerConstraints instance from a JSON string * * @param json JSON string representing layer constraints * @returns A new LayerConstraints instance */ static fromJSON(json: string): LayerConstraints; }