Initializes a OLTransform component.
Object to configure the initialization
The angle for rotation
OptionalcenterThe center of the feature being transformed
OptionalcurrentThe current handle being dragged
ProtecteddisposedThe object has already been disposed.
The collection of features to transform
The layer used to display handles
The source for the handle layer
ProtectedhandlingOptionalmapThe map viewer
OptionalonCallback invoked when a feature is deleted. Bridged to EventHelper delegates by the Transform wrapper.
OptionalonCallback invoked when the selected feature changes. Bridged to EventHelper delegates by the Transform wrapper.
OptionalonCallback invoked when a transformation ends. Bridged to EventHelper delegates by the Transform wrapper.
OptionalonCallback invoked during an ongoing transformation. Bridged to EventHelper delegates by the Transform wrapper.
OptionalonCallback invoked when a transformation starts. Bridged to EventHelper delegates by the Transform wrapper.
Options for the transform interaction
OptionalselectedThe currently selected feature
OptionalstartThe start coordinates when dragging
OptionalstartThe start geometry when transforming
ProtectedtargetKey name.
Listener.
Type.
Listener.
Applies a transformation from a grabbed coordinate to a new coordinate (Keyboard / Crosshair). Handles all transformation types internally based on the handle type.
The coordinate where the handle was grabbed
The coordinate to transform to
The type of handle being transformed
Whether the transformation was successfully applied
ProtectedapplyProtected
Apply any properties from another object without triggering events.
The source object.
Initializes transformation state for keyboard-based transformations (Keyboard / Crosshair). Sets up all necessary state that would normally be set by mouse-down event.
The coordinate where the transformation begins
The type of handle being transformed
True if a transformation was started, false if just an action was performed (e.g., vertex added, feature deleted)
Checks if redo is available.
True if redo is available
Checks if undo is available.
True if undo is available
Clears all handles.
Clears the current selection.
Whether the history should be kept when clearing the selection
Creates handles for the selected feature.
Deletes a vertex at the specified coordinate if one exists.
The coordinate to check for a vertex
Whether a vertex was deleted
Dispatches an event and calls all listeners listening for events
of this type. The event parameter can either be a string or an
Object with a type property.
Event object.
false if anyone called preventDefault on the
event object or if any of the listeners returned false.
Cleans up the interaction.
ProtecteddisposeProtected
Extension point for disposable objects.
Get the listeners for a specified event type. Listeners are returned in the order that they will be called in.
Type.
Listeners.
Get an object of all property names and values.
Object.
Gets the currently selected/transforming feature.
The selected feature or undefined
Handles click events for feature selection and handle interaction.
The map browser event
Whether the event was handled
Handles pointer drag events for feature transformation.
The map browser event
Handles all events, including double-click.
The map browser event
Whether the event was handled
Handles pointer move events for cursor updates.
Not to be confused with moving handles. This overrides the move event from OL Pointer.
The map browser event
Handles pointer up events to finalize transformation.
The map browser event
Whether the event was handled
Optionaltype: string
Type. If not provided,
true will be returned if this event target has any listeners.
Has listeners.
The object has properties.
Checks if a feature is currently being transformed.
The feature to check
True if the feature is being transformed
Checks if any transformation is currently active.
True if transformation is active
Key name.
Old value.
ProtectedonceProtectedonRedoes the next transformation.
Optionalcallback: () => voidTrue if redo was successful
Key name.
Listener.
Type.
Listener.
Restores all handles by recreating them.
Selects a feature for transformation.
The feature to select
Whether to clear the history
Remove the interaction from its current map and attach it to the new map. Subclasses may set up event handlers to get notified about changes to the map here.
Map.
Creates a simple text editor for text features
This function is used to determine if "down" events should be propagated to other interactions or should be stopped.
Was the event handled by the interaction?
Should the down event be stopped?
Undoes the last transformation.
Optionalcallback: () => voidTrue if undo was successful
ProtectedunProtected
Unlisten for a certain type of event.
Type.
Listener.
Updates the handles to match the new geometry.
StaticgetGets the cursor style for a handle type.
The handle type
The cursor style
StaticgetGets the event type from a handle type.
The handle type
The event suffix (start, ing, end)
The event type
StaticrotateRotates a coordinate around a center point by an angle.
The coordinate to rotate
The center point
The angle in radians
The rotated coordinate
StaticscaleScales a coordinate relative to a fixed point.
The coordinate to scale
The fixed point
The X scale factor
The Y scale factor
The scaled coordinate
OpenLayers Transform interaction for manipulating features on the map.