Constructs a new PointListInsertHandle.
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.
The geodesy instance associated with this handle.
You can use this to interpolate line segments, to place insert 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).
Creates new insert handles.
The default implementation creates 1 insert handle on the halfway point between 2 points. You can use geodesy to interpolate between points of 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 always returns true
, to ensure that SinglePointInsertHandle.pointToInsert
is always correct whenever the line segment moves.
Called when this, or another, handle changes the feature or shape, as indicated by the "EditShape" event.
The default implementation does the following:
true
, it calls createInsertionHandles.
An event that is emitted whenever this handle changes the shape of a feature.
EditShape
A handle to insert points into a point list (Polyline).
It composes a list of SinglePointInsertHandle. By default, a SinglePointInsertHandle is placed at the center of every segment of the point list.
See
PointListEditor
Since
2022.1