new Transform(options)
Interaction rotate
Parameters:
| Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
any |
Properties
|
Fires:
- (event:select|rotatestart|rotating|rotateend|translatestart|translating|translateend|scalestart|scaling|scaleend)
Extends
- ol.interaction.Pointer
Members
-
Cursors
-
Cursors for transform
-
style
-
Style for handles
Methods
-
drawSketch_(draw)
-
Draw transform sketch
Parameters:
Name Type Description drawboolean only the center
-
getCenter()
-
Get the rotation center
Returns:
- Type
- ol.coordinates | undefined
-
getFeatures()
-
Get features to transform
Returns:
- Type
- Array.<ol.Feature>
-
handleDownEvent_(evt)
-
Parameters:
Name Type Description evtol.MapBrowserEvent Map browser event.
Returns:
trueto start the drag sequence.- Type
- boolean
-
handleDragEvent_(evt)
-
Parameters:
Name Type Description evtol.MapBrowserEvent Map browser event.
-
handleMoveEvent_(evt)
-
Parameters:
Name Type Description evtol.MapBrowserEvent Event.
-
handleUpEvent_(evt)
-
Parameters:
Name Type Description evtol.MapBrowserEvent Map browser event.
Returns:
falseto stop the drag sequence.- Type
- boolean
-
select(feature, add)
-
Select a feature to transform
Parameters:
Name Type Description featureol.Feature the feature to transform
addboolean true to add the feature to the selection, default false
-
setActive(b)
-
Activate/deactivate interaction
Parameters:
Name Type Description bbool -
setCenter(c)
-
Set the rotation center
Parameters:
Name Type Description col.coordinates | undefined the center point, default center on the objet
-
setDefaultStyle()
-
Set efault sketch style
-
setMap(map)
-
Remove the interaction from its current map, if any, and attach it to a new map, if any. Pass
nullto just remove the interaction from the current map.Parameters:
Name Type Description mapol.Map Map.
-
setStyle(map)
-
Set sketch style.
Parameters:
Name Type Description mapol.Map Map.
ol-ext