Interface IHitTestManager
Package: @aurigma/design-atoms
Methods
findItemByHitTest(point, coordinateSystem)
Returns item from current container that contains specified point. If more than one item matches the point, then this method returns first selected item, if any. If there is no selected item, this method returns first item by the z order.
Declaration
findItemByHitTest(point: PointF, coordinateSystem?: CoordinateSystem): Item;
Parameters
| Type | Name | Description |
|---|---|---|
| PointF | point |
the point. |
| CoordinateSystem | coordinateSystem |
the coordinate system in which point is defined. If value of the coordinateSystem is not provided then page is used as coordinateSystem. |
Returns
| Type | Description |
|---|---|
| Item | Item. |
getItemHandlersByHitTest(point, coordinateSystem)
Returns all item handlers from current container that can be selected and that contain specified point.
Declaration
getItemHandlersByHitTest(point: PointF, coordinateSystem?: CoordinateSystem): BaseRectangleItemHandler[];
Parameters
| Type | Name | Description |
|---|---|---|
| PointF | point |
the point. |
| CoordinateSystem | coordinateSystem |
the coordinate system in which point is defined. If value of the coordinateSystem is not provided then page is used as coordinateSystem. |
Returns
| Type | Description |
|---|---|
| BaseRectangleItemHandler[] | array of ItemHandlers. |
hitTestSelection(rect, workspacePoint, onlyWidthResizeEnabled, tolerance)
Declaration
hitTestSelection(rect: RotatedRectangleF, workspacePoint: PointF, onlyWidthResizeEnabled?: boolean, tolerance?: number): IHitTestResult;
Parameters
| Type | Name | Description |
|---|---|---|
| RotatedRectangleF | rect | |
| PointF | workspacePoint | |
| boolean | onlyWidthResizeEnabled | |
| number | tolerance |
Returns
| Type | Description |
|---|---|
| IHitTestResult |