---
title: "IHitTestManager | Customer's Canvas On-Premises"
canonical: "https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/IHitTestManager/"
---

# IHitTestManager

> 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.

## Interfaces

### IHitTestManager

#### Methods

##### findItemByHitTest()

```ts
findItemByHitTest(point, coordinateSystem?): Item;
```

###### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `point` | `PointF` | the point. |
| `coordinateSystem?` | [`CoordinateSystem`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/CoordinateSystem.md#coordinatesystem) | 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.

##### getItemHandlersByHitTest()

```ts
getItemHandlersByHitTest(point, coordinateSystem?): BaseRectangleItemHandler[];
```

Returns all item handlers from current container that can be selected and that contain specified point.

###### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `point` | `PointF` | the point. |
| `coordinateSystem?` | [`CoordinateSystem`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/CoordinateSystem.md#coordinatesystem) | the coordinate system in which point is defined. If value of the coordinateSystem is not provided then page is used as coordinateSystem. |

###### Returns

[`BaseRectangleItemHandler`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/BaseRectangleItemHandler.md#baserectangleitemhandler)[]

array of ItemHandlers.

##### hitTestSelection()

```ts
hitTestSelection(
   rect, 
   workspacePoint, 
   onlyWidthResizeEnabled?, 
   tolerance?): IHitTestResult;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `rect` | `RotatedRectangleF` |
| `workspacePoint` | `PointF` |
| `onlyWidthResizeEnabled?` | `boolean` |
| `tolerance?` | `number` |

###### Returns

[`IHitTestResult`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/IHitTestResult.md#ihittestresult)
