@aurigma/design-atoms
Version:
Design Atoms is a part of Customer's Canvas SDK which allows for manipulating individual design elements through your code.
23 lines (22 loc) • 1.38 kB
TypeScript
import { BaseRectangleItemHandler } from "../ItemHandlers";
import { PointF, RotatedRectangleF } from "@aurigma/design-atoms-model/Math";
import { Canvas } from "../Canvas";
import { IHitTestManager } from "../Viewer/Interfaces/IHitTestManager";
import { Item } from "@aurigma/design-atoms-model/Product/Items/Item";
import { CoordinateSystem } from "../Viewer/CoordinateSystem";
import { IHitTestResult } from "./IHitTestResult";
export declare class HitTestManager implements IHitTestManager {
private _canvas;
constructor(_canvas: Canvas);
/** @inheritDoc */
getItemHandlersByHitTest(point: PointF, coordinateSystem?: CoordinateSystem): BaseRectangleItemHandler[];
/** @inheritDoc */
findItemByHitTest(point: PointF, coordinateSystem?: CoordinateSystem): Item;
getFirstHandlerByHitTest(workspacePoint: PointF): BaseRectangleItemHandler;
hitTestSelection(rect: RotatedRectangleF, workspacePoint: PointF, onlyWidthResizeEnabled?: boolean, tolerance?: any): IHitTestResult;
/** Get delta from selection center to rotate center. Without angle!*/
static getDeltaFromSelectionCenterToRotateCenter(rotationGripSize: number, selectionHeight: number, selectionWidth: number, contentAngle: number, mul?: number): PointF;
private get _productHandler();
private _convertToProductCoord;
private _convertToWorkspace;
}