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

# SnapLinesHandler

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

## Classes

### SnapLinesHandler

#### Implements

#### Constructors

##### Constructor

```ts
new SnapLinesHandler(conf?): SnapLinesHandler;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `conf?` | [`ISnapLinesConfiguration`](#isnaplinesconfiguration) |

###### Returns

[`SnapLinesHandler`](#snaplineshandler)

#### Properties

##### SnapResult

```ts
static SnapResult: typeof __class;
```

#### Accessors

##### configuration

###### Get Signature

```ts
get configuration(): ISnapLinesConfiguration;
```

###### Returns

[`ISnapLinesConfiguration`](#isnaplinesconfiguration)

##### currentItemRectangle

###### Get Signature

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

###### Returns

`RotatedRectangleF`

###### Implementation of

[`ISnapLinesHandler`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/ISnapLinesHandler.md#isnaplineshandler).[`currentItemRectangle`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/ISnapLinesHandler.md#currentitemrectangle)

#### Methods

##### clearSnapData()

```ts
clearSnapData(): void;
```

###### Returns

`void`

##### constrainMoveDataToSnapLines()

```ts
constrainMoveDataToSnapLines(
   moveData, 
   canvas, 
   allowMoveHorizontal, 
   allowMoveVertical): any;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `moveData` | [`IMoveData`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/ISelectionProcessModifier.md#imovedata) |
| `canvas` | [`Canvas`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/Canvas-1.md#canvas) |
| `allowMoveHorizontal` | `boolean` |
| `allowMoveVertical` | `boolean` |

###### Returns

`any`

##### constrainRectangleToSnapLines()

```ts
constrainRectangleToSnapLines(
   rect, 
   oldRectWithBorder, 
   arbitraryResize, 
   resizeIndex, 
   rectWithFramesAndBorder, 
   rectWithBorder, 
   canvas, 
   border): any;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `rect` | `RotatedRectangleF` |
| `oldRectWithBorder` | `RotatedRectangleF` |
| `arbitraryResize` | `boolean` |
| `resizeIndex` | `number` |
| `rectWithFramesAndBorder` | `RotatedRectangleF` |
| `rectWithBorder` | `RotatedRectangleF` |
| `canvas` | [`Canvas`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/Canvas-1.md#canvas) |
| `border` | [ILtrb](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-model/ILtrb.md) |

###### Returns

`any`

##### fillSnapData()

```ts
fillSnapData(
   startRectangle, 
   startRectangleWithFrames, 
   startRectangleWithBorder, 
   region, 
   interactiveZonesBounds, 
   canvas, 
   isDrag): void;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `startRectangle` | `RotatedRectangleF` |
| `startRectangleWithFrames` | `RotatedRectangleF` |
| `startRectangleWithBorder` | `RectangleF` |
| `region` | `RectangleF` |
| `interactiveZonesBounds` | `RectangleF`[] |
| `canvas` | [`Canvas`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/Canvas-1.md#canvas) |
| `isDrag` | `boolean` |

###### Returns

`void`

##### getHorizontalLineData()

```ts
getHorizontalLineData(): ISnapLineData;
```

###### Returns

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

###### Implementation of

[`ISnapLinesHandler`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/ISnapLinesHandler.md#isnaplineshandler).[`getHorizontalLineData`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/ISnapLinesHandler.md#gethorizontallinedata)

##### getVerticalLineData()

```ts
getVerticalLineData(): ISnapLineData;
```

###### Returns

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

###### Implementation of

[`ISnapLinesHandler`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/ISnapLinesHandler.md#isnaplineshandler).[`getVerticalLineData`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/ISnapLinesHandler.md#getverticallinedata)

##### resetActiveLines()

```ts
resetActiveLines(): void;
```

###### Returns

`void`

##### setConfiguration()

```ts
setConfiguration(conf?): void;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `conf?` | [`ISnapLinesConfiguration`](#isnaplinesconfiguration) |

###### Returns

`void`

## Interfaces

### ISnapItemConfiguration

#### Extends

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

#### Properties

##### color

```ts
color: string;
```

###### Inherited from

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

##### enabled

```ts
enabled: boolean;
```

###### Inherited from

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

##### includeLocked

```ts
includeLocked: boolean;
```

##### priority

```ts
priority: number;
```

###### Inherited from

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

##### tolerance

```ts
tolerance: number;
```

###### Inherited from

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

***

### ISnapLinesConfiguration

#### Properties

##### snapElements

```ts
snapElements: object;
```

###### grid

```ts
grid: ISnapElementConfiguration;
```

###### interactiveZones

```ts
interactiveZones: ISnapElementConfiguration;
```

###### items

```ts
items: ISnapItemConfiguration;
```

###### printArea

```ts
printArea: ISnapElementConfiguration;
```

###### region

```ts
region: ISnapElementConfiguration;
```

###### safetyLines

```ts
safetyLines: ISnapElementConfiguration;
```

## Type Aliases

### SnapDataType

```ts
type SnapDataType = object;
```

#### Properties

##### activeXAnchorIndex

```ts
activeXAnchorIndex: number;
```

##### activeXPointIndex

```ts
activeXPointIndex: number;
```

##### activeYAnchorIndex

```ts
activeYAnchorIndex: number;
```

##### activeYPointIndex

```ts
activeYPointIndex: number;
```

##### defaultBounds

```ts
defaultBounds: MultiSelectMode;
```

##### xAnchors

```ts
xAnchors: IAnchor[];
```

##### xPoints

```ts
xPoints: number[];
```

##### yAnchors

```ts
yAnchors: IAnchor[];
```

##### yPoints

```ts
yPoints: number[];
```
