Composes a list of edit handles.

It can compose them in 2 different ways:

  • non-cascading: The handles are all used together. By default, the nearest handle is used to forward events to.
  • cascading: The handles are used one-by-one. This can be especially useful for creation. Every step of the creation process corresponds to one handle. When the first handle deactivates, the next handle is used, and so on. A CreateByTemplateHandle is an example of a cascading handle. First, a point is created to position the template. After the template is positioned, the CreateByTemplateHandle delegates to the shape's edit handles so the user can further adapt the template to the desired shape.

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 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

  • Emits an "EditShape" event.

    Typically, a handle emits this right after changing the shape.

    Parameters

    Returns void

  • Finds the handles to interact with, based on a given input event.

    Note that this is only used if cascading is false.

    Parameters

    Returns EditHandle[]

    handles that are close to the mouse cursor / finger.

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