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
OptionalonOptionalonOptionalonOptionalonOptionalonCallback functions for events
Options for the transform interaction
OptionalselectedThe currently selected feature
OptionalstartThe start coordinates when dragging
OptionalstartThe start geometry when transforming
ProtectedtargetKey name.
Listener.
Type.
Listener.
ProtectedapplyProtectedApply any properties from another object without triggering events.
The source object.
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
Context menu event handler to prevent context menu when removing vertices
Creates a delete handle for the feature.
The extent of the feature.
Creates the extent boundary rectangle.
The expanded extent.
Creates a handle at the specified coordinate with the given type.
The coordinate for the handle.
The type of handle.
Optionalproperties: CreateHandlePropsCreates handles for the selected feature.
Creates a rotation handle above the feature.
The extent of the feature.
Creates scale handles at the corners of the extent.
The extent of the feature.
Creates stretch handles at the middle of each side of the extent.
The extent of the feature.
Creates vertex handles for LineString and Polygon geometries.
The geometry to create vertex handles for.
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.
ProtecteddisposeProtectedExtension 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 adding a new vertex.
The coordinate for the new vertex.
OptionalmidpointHandle: Feature<Geometry>The midpoint handle being dragged.
Handle Click Events
The map browser event.
Whether the event was handled.
Handle pointer drag events.
The map browser event.
Handle all events, including double-click
The map browser event.
Whether the event was handled.
Handle pointer move events. Not to be confused with moving handles. This overrides the move event from OL Pointer
The map browser event.
Handles scaling of a feature.
The current coordinate.
The type of handle being dragged.
If the ctrlKey is being pressed to maintain the ratio
Handles stretching of a feature.
The current coordinate.
The type of handle being dragged.
Handles translation of a feature.
The change in X coordinate.
The change in Y coordinate.
Handle pointer up events.
The map browser event.
Whether the event was handled.
Handles moving a vertex.
The new coordinate.
OptionalvertexHandle: Feature<Geometry>The vertex handle being dragged.
Optionaltype: stringType. 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.
ProtectedonceHandles when a feature is removed from the collection.
The event.
ProtectedonRedoes the next transformation.
Optionalcallback: () => voidTrue if redo was successful.
Key name.
Listener.
Type.
Listener.
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.
ProtectedunProtectedUnlisten 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 OLTransform