---
metadata:
  - name: generator
    content: Diplodoc Platform v5.39.1
alternate:
  - https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/geometryEditor.model.RootLineString.md
  - https://yandex.ru/dev/jsapi-v2-1/doc/ru/v2-1/ref/reference/geometryEditor.model.RootLineString.md
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.ru/dev/jsapi-v2-1/doc/en/llms.txt

# geometryEditor.model.RootLineString

{% note info %}

The constructor of the geometryEditor.model.RootLineString class is hidden, as this class is not intended for autonomous initialization.

{% endnote %}

Extends [IGeometryEditorRootModel](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IGeometryEditorRootModel.md).

Model of the root polyline. The constructor is not available in the package.full (a standard set of modules). This module is loaded on demand.

[Fields](#properties-summary) | [Methods](#methods-summary)

## Fields {#properties-summary}

#|
|| **Name** | **Type** | **Description** ||
|| [events](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IEventEmitter.md#events) | [IEventManager](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IEventManager.md)| Event manager.

Inherited from [IEventEmitter](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IEventEmitter.md#events). ||
|#

## Methods {#methods-summary}

#|
|| **Name** | **Returns** | **Description** ||
|| [destroy](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IGeometryEditorModel.md#destroy)() | | Destructor.

Inherited from [IGeometryEditorModel](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IGeometryEditorModel.md#destroy). ||
|| [getAllVerticesNumber](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/geometryEditor.model.RootLineString.md#getAllVerticesNumber)() | Integer
| Returns the total number of vertexes in the geometry being edited. ||
|| [getPixels](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IGeometryEditorModel.md#getPixels)() | Number[]
| Returns the model's pixel data.

Inherited from [IGeometryEditorModel](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IGeometryEditorModel.md#getPixels). ||
|| [getVertexModels](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/geometryEditor.model.RootLineString.md#getVertexModels)() | [geometryEditor.model.ChildVertex](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/geometryEditor.model.ChildVertex.md)[]
| Returns an array of models for child vertexes. ||
|| [spliceVertices](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/geometryEditor.model.RootLineString.md#spliceVertices)([start](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/geometryEditor.model.RootLineString.md#spliceVertices-param-start), [deleteCount](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/geometryEditor.model.RootLineString.md#spliceVertices-param-deleteCount)) | Number[][]
| Deletes a defined number of polyline vertexes, starting from the specified index. New vertexes can be added in place of the deleted ones. Global pixel coordinates of the new vertexes can be passed as additional arguments after the "deleteCount" parameter. ||
|#

## Methods details {#method_detail}

### getAllVerticesNumber {#getAllVerticesNumber}

```javascript
{Integer} getAllVerticesNumber()
```

**Returns** the total number of vertexes in the geometry being edited.

### getVertexModels {#getVertexModels}

```javascript
{geometryEditor.model.ChildVertex[]} getVertexModels()
```

**Returns** an array of models for child vertexes.

### spliceVertices {#spliceVertices}

```javascript
{Number[][]} spliceVertices(start, deleteCount)
```

Deletes a defined number of polyline vertexes, starting from the specified index. New vertexes can be added in place of the deleted ones. Global pixel coordinates of the new vertexes can be passed as additional arguments after the "deleteCount" parameter.

**Returns** an array of coordinates of deleted vertexes.

**Parameters:**

#|
|| **Parameter** | **Default value** | **Description**  ||
|| [`start`](#spliceVertices-param-start)[*](*star) | — | Type: Integer

The index to start from for removing and adding vertexes. ||
|| [`deleteCount`](#spliceVertices-param-deleteCount)[*](*star) | — | Type: Integer

The number of deleted vertexes. ||
|#

\* Mandatory parameter/option.

[*star]: Mandatory parameter/option.