HitTestManager
Classes
HitTestManager
Implements
Constructors
Constructor
new HitTestManager(canvas): HitTestManager;
Parameters
| Parameter | Type |
|---|---|
canvas | Canvas |
Returns
Methods
findItemByHitTest()
findItemByHitTest(point, coordinateSystem?): Item;
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.
Parameters
| Parameter | Type | Default value | Description |
|---|---|---|---|
point | PointF | undefined | the point. |
coordinateSystem | CoordinateSystem | CoordinateSystem.page | the coordinate system in which point is defined. If value of the coordinateSystem is not provided then page is used as coordinateSystem. |
Returns
Item
Item.
Implementation of
IHitTestManager.findItemByHitTest
getFirstHandlerByHitTest()
getFirstHandlerByHitTest(workspacePoint): BaseRectangleItemHandler;
Parameters
| Parameter | Type |
|---|---|
workspacePoint | PointF |
Returns
getItemHandlersByHitTest()
getItemHandlersByHitTest(point, coordinateSystem?): BaseRectangleItemHandler[];
Returns all item handlers from current container that can be selected and that contain specified point.
Parameters
| Parameter | Type | Default value | Description |
|---|---|---|---|
point | PointF | undefined | the point. |
coordinateSystem | CoordinateSystem | CoordinateSystem.page | the coordinate system in which point is defined. If value of the coordinateSystem is not provided then page is used as coordinateSystem. |
Returns
array of ItemHandlers.
Implementation of
IHitTestManager.getItemHandlersByHitTest
hitTestSelection()
hitTestSelection(
rect,
workspacePoint,
onlyWidthResizeEnabled?,
tolerance?): IHitTestResult;
Parameters
| Parameter | Type | Default value |
|---|---|---|
rect | RotatedRectangleF | undefined |
workspacePoint | PointF | undefined |
onlyWidthResizeEnabled | boolean | false |
tolerance | any | null |
Returns
Implementation of
IHitTestManager.hitTestSelection
getDeltaFromSelectionCenterToRotateCenter()
static getDeltaFromSelectionCenterToRotateCenter(
rotationGripSize,
selectionHeight,
selectionWidth,
contentAngle,
mul?): any;
Get delta from selection center to rotate center. Without angle!
Parameters
| Parameter | Type | Default value |
|---|---|---|
rotationGripSize | number | undefined |
selectionHeight | number | undefined |
selectionWidth | number | undefined |
contentAngle | number | undefined |
mul | number | 1 |
Returns
any