Constructor
new ShapeEditor(worldWindow)
Constructs a new shape editor attached to the specified World Window.
Parameters:
Name | Type | Description |
---|---|---|
worldWindow |
WorldWindow | The World Window to associate this shape editor controller with. |
- Source:
Throws:
-
If the specified World Window is
null
orundefined
. - Type
- ArgumentError
Members
annotationAttributes :AnnotationAttributes
Attributes used for the annotation that displays hints during the actions on the shape.
Type:
- Source:
moveControlPointAttributes :PlacemarkAttributes
Attributes used for the control points that move the boundaries of the shape.
Type:
- Source:
resizeControlPointAttributes :PlacemarkAttributes
Attributes used for the control points that resize the shape.
Type:
- Source:
rotateControlPointAttributes :PlacemarkAttributes
Attributes used for the control points that rotate the shape.
Type:
- Source:
shadowControlPointAttributes :PlacemarkAttributes
Attributes used for the shadow control points used to mask the middle of a segment.
Type:
- Source:
(readonly) shape :Object
The shape currently being edited.
Type:
- Object
- Source:
(readonly) worldWindow :WorldWindow
The World Window associated with this shape editor.
Type:
- Source:
Methods
create(shape, properties) → {Promise}
Creates the specified shape. Currently, only surface shapes are supported.
Parameters:
Name | Type | Description |
---|---|---|
shape |
SurfaceShape | The shape to edit. |
properties |
Object | Configuration properties for the shape:
|
- Source:
Returns:
shape
if the creator can create the specified shape; otherwise
null
.
- Type
- Promise
edit(shape, config) → {Boolean}
Edits the specified shape. Currently, only surface shapes are supported.
Parameters:
Name | Type | Description |
---|---|---|
shape |
SurfaceShape | The shape to edit. |
config |
Object | Configuration properties for the ShapeEditor:
|
- Source:
Returns:
true
if the editor could start the edition of the specified shape; otherwise
false
.
- Type
- Boolean
isCreatorEnabled()
Identifies whether the shape editor create mode is armed.
- Source:
Returns:
true if armed, false if not armed.
setCreatorEnabled(armed)
Arms and disarms the shape editor create mode. When armed, editor monitors user input and builds the
shape in response to user actions. When disarmed, the shape editor ignores all user input for creation of a
new shape.
Parameters:
Name | Type | Description |
---|---|---|
armed |
true to arm the shape editor create mode, false to disarm it. |
- Source:
stop() → {SurfaceShape}
Stops the current edition activity if any.
- Source:
Returns:
The shape being edited if any; otherwise
null
.
- Type
- SurfaceShape