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.

2022.1

Hierarchy (View Summary)

Constructors

Accessors

  • set activeHandleIndex(index: number): void

    The index of the active handle.

    The active handle is the handle that is currently handling gesture events. It takes priority over other handles, as long as it is handling events. Once it stops handling events (when it returns HandleEventResult.EVENT_IGNORED), the composite will forward events to other handles, which can become active.

    -1 if no handle is currently 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: readonly EditHandle[]): void

    Parameters

    Returns void

Methods

  • Invalidates this edit handle.

    This will cause onDraw and onDrawLabel to be called again.

    Use this if you need to update the visualization of the handle. For example, the handle has changed style and onDraw needs to be re-evaluated.

    Returns void

    2024.0.02

  • 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