A collection of edit handles that become active one-by-one.

As opposed to CompositeEditHandle, only one handle is active at a time. Once a handle finishes, the next one becomes active.

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

2024.0

Hierarchy (view full)

Constructors

Accessors

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

    Returns readonly EditHandle[]

  • get index(): number
  • The index of the currently active handle.

    Returns number

    Since

    2024.0

  • set index(val): void
  • Parameters

    • val: number

    Returns void

Methods

  • Emits an "EditShape" event.

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

    Parameters

    Returns void

  • 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

    Since

    2024.0.02

  • Delegates to the currently active handle's shouldPaintFeature.

    Parameters

    Returns boolean

    Since

    2024.0

  • Delegates to all handles' update.

    Returns void

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

"Invalidated" event

  • on("Invalidated", callback: (() => void)) : Handle
  • An event that is emitted whenever this handle is invalidated.

    Invalidated

    Parameters

    • event: "Invalidated"
    • callback: (() => void)
        • (): void
        • Returns void

    Returns Handle