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.

50 lines (49 loc) 2.47 kB
import { Color } from "@aurigma/design-atoms-model"; import { Surface, SurfaceContainer, PrintArea, Product, Container } from "@aurigma/design-atoms-model/Product"; import { Item } from "@aurigma/design-atoms-model/Product/Items"; import { ItemHandler } from "../ItemHandlers"; import { Viewer } from "../Viewer"; import { ISize } from "../Utils/Math"; import { EventManager } from "./EventManager"; import { IQueryOptions } from "@aurigma/design-atoms-interfaces"; export declare class ProductHandler { private _viewer; private _eventManager; private _interactiveContainers; private _maskedContainers; constructor(_viewer: Viewer, _eventManager: EventManager); get currentSurface(): Surface; set currentSurface(surface: Surface); get contentAngle(): number; get regionForCurrentContainer(): import("@aurigma/design-atoms-model").RectangleF; get product(): Product; get selectedItems(): Item[]; get userEditContainer(): SurfaceContainer; get userEditPrintArea(): PrintArea; get suppressOutOfRegionManipulation(): boolean; /** * Gets or sets interactive containers of the Product. * @remarks Interactive containers allows to define product containers which items can be selected by user. * If this property is null or empty then items from any containers can be selected by user. */ get interactiveContainers(): Container[]; set interactiveContainers(value: Container[]); queryItems(selectors: string, queryOptions?: IQueryOptions): Item[]; getHandler: <T extends ItemHandler>(item: Item) => T; redraw(): void; beginMultiCall(): void; endMultiCall(): void; waitUpdate(): Promise<void[]>; getProductColors(initialProduct: Product): Color[]; checkSelectionByHitTest(x: number, y: number): boolean; getPrintAreaVisualSize(targetContainer?: SurfaceContainer, printArea?: PrintArea): ISize; getVisualSize(size: ISize): ISize; getPrintAreaBounds(container?: SurfaceContainer, printArea?: PrintArea): import("@aurigma/design-atoms-model").RectangleF; isInteractive(object: Container | Item): boolean; updateSelection(): void; updateMaskedContainers(): void; isMasked(container: Container): boolean; exitEditMode(): void; isItemSelected(item: Item): boolean; applyLayout(product: Product, surfaceFilterFunc?: (index: number, surface: Surface) => boolean): Promise<void>; }