UNPKG

@aurigma/design-atoms

Version:

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

94 lines (93 loc) 4.38 kB
import { LayoutItem, AutoLayoutOrientation, AutoLayoutAlignItems, AutoLayoutJustifyContent, Item } from "@aurigma/design-atoms-model/Product/Items"; import { RotatedRectangleF, RectangleF, Matrix } from "@aurigma/design-atoms-model/Math"; import { GroupItemHandler } from "./GroupItemHandler"; import { IGroupHandler, ItemHandler } from "./ItemHandler"; import { EventObject } from "@aurigma/design-atoms-model/EventObject"; import { History } from "../History/History"; import * as TextWhizz from "@aurigma/text-whizz/TextWhizzJS"; import { IHitTestResult } from "../Services/IHitTestResult"; export declare class LayoutItemHandler extends GroupItemHandler implements IGroupHandler { private _history; private _layoutHandler; private _layoutEvent; private _visibilityState; private _visibilityStateChangedEvent; private _isEmpty; private _disableApplyLayout; static readonly typeName: string; constructor(item: LayoutItem, itemHandlers: ItemHandler[], _history: History, textWhizz?: typeof TextWhizz); getSelectionRectangle(): RotatedRectangleF; protected _getHighlightRectangle(): RotatedRectangleF; setItemHandlers(itemHandlers: ItemHandler[]): void; protected _isGroupHandler(): boolean; _rectMap: { [name: string]: RotatedRectangleF; }; protected _onChildItemChanged: (sender: any) => void; protected _onChildItemHandlerVisibilityChanged: () => void; protected _onChildItemHandlerLayout: (changed: boolean) => void; protected _onChildItemHandlerChanging: (sender: Item) => void; protected _onItemPropertyChanged(sender: LayoutItem, propertyName: string): void; private _initLayoutHandler; getVisibilityStateChangedEvent(): EventObject<void>; getLayoutEvent(): EventObject<boolean>; private _onLayoutHandlerLayoutEvent; private _initSourceRectangle; private _resetSourceRectangle; waitUpdate(): Promise<void>; private _originalHeight; private _transformStarted; startTransform(operation?: IHitTestResult): void; onResized(): boolean; _endTransform(changed: any, resized: any, suppressOnChanged: any): void; protected _getChildrenHighlights(): RotatedRectangleF[]; protected get _calculateRectangleFromChild(): boolean; protected _getRectangle(): RotatedRectangleF; isEmpty(): boolean; isVisible(): boolean; applyLayout(sender?: ItemHandler): Promise<void>; getControlBounds(): RectangleF; _transformedRectangle: RotatedRectangleF; setRectangle(rectangle: RotatedRectangleF, suppressOnChanged?: boolean, updateChildren?: boolean): void; setSourceRectangle(rectangle: RotatedRectangleF): void; protected _applyMatrix: (matrix: Matrix, finished: boolean, newAngle?: number) => void; getOrderedItems(): any; generateAndApplyAutolayoutSettings(alignItems?: AutoLayoutAlignItems, orientation?: AutoLayoutOrientation, margin?: number, justifyContent?: AutoLayoutJustifyContent): void; protected _onItemAdded(data?: { item: Item; index: number; }): Promise<void>; protected _onItemRemoved(data?: { item: Item; index: number; }): void; protected _onItemHandlerAdded(data?: { item: ItemHandler; index: number; }): Promise<void>; private _onItemHandlerExitedEditMode; private _updateVisibilityState; private _onVisibilityStateChanged; private _onItemHandlerEnteredEditMode; protected _onItemHandlerRemoved(data?: { item: ItemHandler; index: number; }): void; private _subscribeChildItemHandlers; private _unsubscribeChildItemHandlers; private _subscribeChildItemHandler; private _unsubscribeChildItemHandler; private _unsubscribeChildItems; private _subscribeChildItems; private _unsubscribeChildItemChanges; private _subscribeChildItemChanges; private _onChildGroupItemsChanged; protected _onRemovedFromCanvas(canvas: any): Promise<void>; protected _onAddedOnCanvas(canvas: any): Promise<void>; drawItemHandler(itemHandlerCtx: CanvasRenderingContext2D): void; get item(): LayoutItem; isChildVisible(childItemHandler: ItemHandler): boolean; private _calculateIsEmpty; private _updateIsEmpty; private _onEmptyStateChanged; }