Handle to delete a single point from a pointlist.

This handle is intended to be used in the composite PointListDeleteHandle.

The default implementation of this handle draws nothing. The user can delete points by holding a modifier key while clicking on a point of the point list. For touch input, the user can delete points by long-pressing a point of the point list.

Since

2022.1

Hierarchy

Constructors

Accessors

  • get active(): boolean
  • Indicates whether the handle is active.

    Returns boolean

  • set active(active): void
  • Parameters

    • active: boolean

    Returns void

  • get index(): number
  • The index of the point in the point list, for this handle.

    Returns number

  • get snapPoint(): null | Point
  • The point to snap to.

    This is used to paint a snap icon.

    Typically, this is set by subclasses, for example in PointDragHandle.drag.

    Returns null | Point

  • set snapPoint(p): void
  • Parameters

    Returns void

Methods

  • Returns the cursor for this point handle.

    • if the handle is active, this returns "grab".
    • if the handle is inactive, but the mouse interacts with the point, this returns "pointer".
    • otherwise, null is returned.

    Parameters

    Returns null | string

  • Returns the default handle icon style.

    This is the handle icon style that is used if no handleIconStyle was passed into the constructor.

    By default, point list delete handles don't draw any icons.

    Parameters

    Returns null | IconStyle

    null

  • Checks whether the given input event interacts with the point handle.

    By default, this returns true if the mouse or finger is within a certain distance of the point. A larger distance is used for touch events than for mouse events.

    Parameters

    Returns boolean

  • This method allows the handle to draw labels on the map.

    For example, you can use this to show coordinates of points, or the current radius of a circle on top of an edit handle.

    The default implementation draws nothing.

    Parameters

    Returns void

  • Checks if the handle should deactivate.

    The default implementation always returns true, so the handle deactivates immediately after activation.

    Parameters

    Returns boolean

  • Checks if this handle should start processing.

    The default implementation starts processing:

    Parameters

    Returns boolean

  • Called when (another) handle changes the feature or shape, as indicated by the "EditShape" event.

    This handle can update its own state, based on the changed shape.

    For example, a PointListInsertHandle just inserted a point in a polyline. The PointListTranslateHandle uses the update to recalculate new sub-handles, based on the new polyline (with the extra point).

    The default implementation does nothing.

    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