A handle to translate points in a point list (Polyline).

It composes a list of SinglePointTranslateHandle. By default, a SinglePointTranslateHandle is placed at every point of the point list.

See

PointListEditor

Since

2022.1

Hierarchy

Constructors

Accessors

  • set activeHandleIndex(index): void
  • The index of the active handle.

    Only relevant when cascading is false.

    -1 if no handle should be active.

    Parameters

    • index: number

    Returns void

  • get handleIconStyle(): undefined | null | IconStyle
  • The handle's icon style, as defined at construction time.

    Returns undefined | null | IconStyle

  • get handles(): readonly EditHandle[]
  • The list of handles that this CompositeEditHandle delegates to.

    Note that the setter has side effects. Do not modify the list of handles in-place (e.g. push() new handles to the array after the setter has been called).

    Returns readonly EditHandle[]

  • set handles(handles): void
  • Parameters

    Returns void

Methods

  • Checks if the handles should be updated.

    By default, this returns true if the shape's point count is different from the current amount of handles. Ie. only when the size of the point list changes, new SinglePointTranslateHandle need to be created.

    If you create a different number of translate handles, then this check should reflect that.

    For example, if you disallow deletion of the first and last point, this method should check if the number of handles is different from shape.pointCount - 2

    Returns boolean

Events

"EditShape" event

  • on("EditShape", callback: ((event) => void)) : Handle
  • An event that is emitted whenever this handle changes the shape of a feature.

    EditShape

    Parameters

    • event: "EditShape"
    • callback: ((event) => void)

    Returns Handle