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

# SelectionRectangleHandler

> [`SelectionRectangleHandler`](#selectionrectanglehandler)

## Classes

### SelectionRectangleHandler

#### Constructors

##### Constructor

```ts
new SelectionRectangleHandler(selectionModifier?): SelectionRectangleHandler;
```

###### Parameters

| Parameter | Type | Default value |
| ------ | ------ | ------ |
| `selectionModifier` | [`ISelectionProcessModifier`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/ISelectionProcessModifier.md#iselectionprocessmodifier) | `null` |

###### Returns

#### Accessors

##### rectangle

###### Get Signature

```ts
get rectangle(): RotatedRectangleF;
```

###### Returns

`RotatedRectangleF`

#### Methods

##### addRectangleAngleChanged()

```ts
addRectangleAngleChanged(handler): void;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `handler` | (`args`) => `any` |

###### Returns

`void`

##### addRectangleChanged()

```ts
addRectangleChanged(handler): void;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `handler` | (`args`) => `any` |

###### Returns

`void`

##### addRectangleMoved()

```ts
addRectangleMoved(handler): void;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `handler` | (`args`) => `any` |

###### Returns

`void`

##### addRectangleResized()

```ts
addRectangleResized(handler): void;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `handler` | (`args`) => `any` |

###### Returns

`void`

##### addStateChanged()

```ts
addStateChanged(handler): void;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `handler` | (`state`) => `any` |

###### Returns

`void`

##### move()

```ts
move(params): void;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `params` | [`IMoveParams`](#imoveparams) |

###### Returns

`void`

##### removeRectangleAngleChanged()

```ts
removeRectangleAngleChanged(handler): void;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `handler` | (`args`) => `any` |

###### Returns

`void`

##### removeRectangleChanged()

```ts
removeRectangleChanged(handler): void;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `handler` | (`args`) => `any` |

###### Returns

`void`

##### removeRectangleMoved()

```ts
removeRectangleMoved(handler): void;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `handler` | (`args`) => `any` |

###### Returns

`void`

##### removeRectangleResized()

```ts
removeRectangleResized(handler): void;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `handler` | (`args`) => `any` |

###### Returns

`void`

##### removeStateChanged()

```ts
removeStateChanged(handler): void;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `handler` | (`state`) => `any` |

###### Returns

`void`

##### startMove()

```ts
startMove(startRectangle): void;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `startRectangle` | `RotatedRectangleF` |

###### Returns

`void`

##### startMovingByPoint()

```ts
startMovingByPoint(startPoint, startRectangle): void;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `startPoint` | `PointF` |
| `startRectangle` | `RotatedRectangleF` |

###### Returns

`void`

##### startResizingByPoint()

```ts
startResizingByPoint(
   startPoint, 
   startRectangle, 
   resizeIndex, 
   allowNegativeResize, 
   itemHandlers): void;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `startPoint` | `PointF` |
| `startRectangle` | `RotatedRectangleF` |
| `resizeIndex` | `number` |
| `allowNegativeResize` | `boolean` |
| `itemHandlers` | [`BaseRectangleItemHandler`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/BaseRectangleItemHandler.md#baserectangleitemhandler)[] |

###### Returns

`void`

##### startRotatingByPoint()

```ts
startRotatingByPoint(startPoint, startRectangle): void;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `startPoint` | `PointF` |
| `startRectangle` | `RotatedRectangleF` |

###### Returns

`void`

##### updateMovingByPoint()

```ts
updateMovingByPoint(args): void;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `args` | [`IMoveByPointParams`](#imovebypointparams) |

###### Returns

`void`

##### updateResizingByPoint()

```ts
updateResizingByPoint(args, itemHandlers?): void;
```

###### Parameters

| Parameter | Type | Default value |
| ------ | ------ | ------ |
| `args` | [`IResizeByPointParams`](#iresizebypointparams) | `undefined` |
| `itemHandlers` | [`BaseRectangleItemHandler`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/BaseRectangleItemHandler.md#baserectangleitemhandler)[] | `null` |

###### Returns

`void`

##### updateRotatingByPoint()

```ts
updateRotatingByPoint(params): void;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `params` | [`IRotateByPointParams`](#irotatebypointparams) |

###### Returns

`void`

## Interfaces

### IMoveByPointParams

#### Extends

- [`ISelectionRectangleOperationParams`](#iselectionrectangleoperationparams)

#### Properties

##### allowMoveHorizontal?

```ts
optional allowMoveHorizontal?: boolean;
```

##### allowMoveVertical?

```ts
optional allowMoveVertical?: boolean;
```

##### finished

```ts
finished: boolean;
```

###### Inherited from

[`ISelectionRectangleOperationParams`](#iselectionrectangleoperationparams).[`finished`](#finished-8)

##### point

```ts
point: PointF;
```

***

### IMoveParams

#### Extends

- [`ISelectionRectangleOperationParams`](#iselectionrectangleoperationparams)

#### Properties

##### allowMoveHorizontal?

```ts
optional allowMoveHorizontal?: boolean;
```

##### allowMoveVertical?

```ts
optional allowMoveVertical?: boolean;
```

##### delta

```ts
delta: PointF;
```

##### finished

```ts
finished: boolean;
```

###### Inherited from

[`ISelectionRectangleOperationParams`](#iselectionrectangleoperationparams).[`finished`](#finished-8)

***

### IRectangleMovedEventArgs

#### Extends

- [`ISelectionRectangleOperationParams`](#iselectionrectangleoperationparams)

#### Properties

##### delta

```ts
delta: PointF;
```

##### finished

```ts
finished: boolean;
```

###### Inherited from

[`ISelectionRectangleOperationParams`](#iselectionrectangleoperationparams).[`finished`](#finished-8)

***

### IRectangleResizedEventArgs

#### Extends

- [`ISelectionRectangleOperationParams`](#iselectionrectangleoperationparams)

#### Properties

##### angle?

```ts
optional angle?: number;
```

##### finished

```ts
finished: boolean;
```

###### Inherited from

[`ISelectionRectangleOperationParams`](#iselectionrectangleoperationparams).[`finished`](#finished-8)

##### origin

```ts
origin: PointF;
```

##### scaleX

```ts
scaleX: number;
```

##### scaleY

```ts
scaleY: number;
```

***

### IRectangleRotatedEventArgs

#### Extends

- [`ISelectionRectangleOperationParams`](#iselectionrectangleoperationparams)

#### Properties

##### angle

```ts
angle: number;
```

##### finished

```ts
finished: boolean;
```

###### Inherited from

[`ISelectionRectangleOperationParams`](#iselectionrectangleoperationparams).[`finished`](#finished-8)

##### origin

```ts
origin: PointF;
```

***

### IResizeByPointParams

#### Extends

- [`ISelectionRectangleOperationParams`](#iselectionrectangleoperationparams)

#### Properties

##### arbitraryResize

```ts
arbitraryResize: boolean;
```

##### finished

```ts
finished: boolean;
```

###### Inherited from

[`ISelectionRectangleOperationParams`](#iselectionrectangleoperationparams).[`finished`](#finished-8)

##### point

```ts
point: PointF;
```

##### resizeIndex

```ts
resizeIndex: number;
```

***

### IRotateByPointParams

#### Extends

- [`ISelectionRectangleOperationParams`](#iselectionrectangleoperationparams)

#### Properties

##### finished

```ts
finished: boolean;
```

###### Inherited from

[`ISelectionRectangleOperationParams`](#iselectionrectangleoperationparams).[`finished`](#finished-8)

##### point

```ts
point: PointF;
```

##### rotationStep

```ts
rotationStep: number;
```

##### tolerance

```ts
tolerance: number;
```

***

### ISelectionRectangleEventArgs

#### Properties

##### finished

```ts
finished: boolean;
```

##### rectangle

```ts
rectangle: RotatedRectangleF;
```

***

### ISelectionRectangleOperationParams

#### Extended by

- [`IRectangleRotatedEventArgs`](#irectanglerotatedeventargs)
- [`IRectangleResizedEventArgs`](#irectangleresizedeventargs)
- [`IRectangleMovedEventArgs`](#irectanglemovedeventargs)
- [`IRotateByPointParams`](#irotatebypointparams)
- [`IMoveByPointParams`](#imovebypointparams)
- [`IMoveParams`](#imoveparams)
- [`IResizeByPointParams`](#iresizebypointparams)

#### Properties

##### finished

```ts
finished: boolean;
```
