Constructs a new PointListDeleteHandle.
Protected
activeThe index of the active handle.
Only relevant when cascading is false
.
-1 if no handle should be active.
Protected
eventedThe EventedSupport used to emit events.
Typically, handles use emitEditShapeEvent to emit "EditShape" events. This is only used in advanced cases, for example when compositing multiple handles.
Protected
handlesThe 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).
The minimum point count of the handle, as defined at construction time.
Creates delete handles for the pointList being edited / created.
If you change the number of created handles, you should update shouldUpdateHandles as well.
The default implementation creates a SinglePointDeleteHandle for every point in the point list.
Protected
emitEmits an "EditShape"
event.
Typically, a handle emits this right after changing the shape.
The shape to emit an edit event for
The status of the edit. Typically, this is IN_PROGRESS while the handle is being dragged / changed, and EditShapeStatus.FINISHED when the drag ends.
Finds the handles to interact with, based on a given input event.
Note that this is only used if cascading is false
.
The event to find handles for
The edit context
handles that are close to the mouse cursor / finger.
Returns the mouse cursor to show.
In cascading mode, this returns the cursor of the active cascading handle.
If there is an active handle, its cursor is returned. Otherwise, the first interaction handle's cursor is used.
Called when a ContextMenu is populated.
EditHandle in the list of handles.
Draws handle shapes on the map.
Draws handle labels on the map.
EditHandle in the list of handles.
Handles the given context.
In cascading mode, it forwards the event to the active cascading handle.
In non-cascading mode, it forwards the event to all interaction handles. If one the interaction handles then handles the event, that handle becomes the active handle until it deactivates (returns HandleEventResult.REQUEST_DEACTIVATION or ignores an event).
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.
If you create a different number of delete 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
Called when (another) handle changes the feature or shape, as indicated by the "EditShape" event.
The default implementation does the following:
true
, it calls createDeleteHandles.
An event that is emitted whenever this handle changes the shape of a feature.
EditShape
A handle to delete points from a point list (Polyline).
It composes a list of SinglePointDeleteHandle. By default, a SinglePointDeleteHandle is placed at every point of the point list.
See
PointListEditor
Since
2022.1