UNPKG

@aurigma/design-atoms-model

Version:

Design Atoms is a part of Customer's Canvas SDK which allows for manipulating individual design elements through your code.

88 lines (87 loc) 3.35 kB
import { Item } from "./Item"; import { GroupItem } from "./GroupItem"; import { EventObject } from "../../EventObject"; import { RectangleF } from "../../Math"; export declare class LayoutItem extends GroupItem { private static _layoutItemsOrderTagKey; private _layoutSettings; private _sourceRectangle; static type: string; type: string; constructor(items?: Item[], layoutSettings?: DefaultLayoutSettings); getSimplifiedObject(omitProperties?: string[] | string): Object; protected _copy(source: LayoutItem, destination: LayoutItem, generateNewIds: boolean, appropriateParentContainer: boolean): void; protected _copyItemsOrder(source: LayoutItem, destination: LayoutItem): void; clone(generateNewIds?: boolean, appropriateParentContainer?: boolean): LayoutItem; get layoutSettings(): DefaultLayoutSettings; set layoutSettings(value: DefaultLayoutSettings); private _onLayoutSettingsChanged; get sourceRectangle(): RectangleF; set sourceRectangle(value: RectangleF); private _subscribeSourceRectangle; private _unsubscribeSourceRectangle; addItems(items: Item[], targetIndex?: number, orderIndex?: number): void; removeItems(items: Item[]): void; addItem(item: Item, targetIndex?: number, orderIndex?: number): void; private static _insertToOrder; setItemsOrder(ids: string[]): void; getItemsOrder(): string[]; getSortedItems(): Item[]; getItemOrderIndex(item: Item): number; static generateAutoLayoutSettings(rectangles: RectangleF[], alignItems?: AutoLayoutAlignItems, orientation?: AutoLayoutOrientation, margin?: number, justifyContent?: AutoLayoutJustifyContent): AutoLayoutSettings; isChildVisible(item: Item): boolean; equals(other: LayoutItem): any; } export declare enum LayoutType { default = 0, auto = 1 } export declare enum AutoLayoutAlignItems { none = 0, center = 1, start = 2, end = 3 } export declare enum AutoLayoutOrientation { vertical = 0, horizontal = 1 } export declare enum AutoLayoutJustifyContent { stretch = 0, spaceBetween = 1 } export declare enum AutoLayoutAnchorPoint { start = 0, center = 1, end = 2 } export declare class DefaultLayoutSettings { static type: string; type: string; propertyChanged: EventObject<unknown>; clone(): DefaultLayoutSettings; getSimplifiedObject(): Object; equals(other: DefaultLayoutSettings): any; } export declare class AutoLayoutSettings extends DefaultLayoutSettings { static type: string; type: string; private _margin; private _orientation; private _alignItems; private _anchorPoint; private _justifyContent; get margin(): number; set margin(value: number); get orientation(): AutoLayoutOrientation; set orientation(value: AutoLayoutOrientation); get alignItems(): AutoLayoutAlignItems; set alignItems(value: AutoLayoutAlignItems); get justifyContent(): AutoLayoutJustifyContent; set justifyContent(value: AutoLayoutJustifyContent); get anchorPoint(): AutoLayoutAnchorPoint; set anchorPoint(value: AutoLayoutAnchorPoint); clone(): AutoLayoutSettings; getSimplifiedObject(): Object; equals(other: AutoLayoutSettings): any; }