Class GSHandle
Extends GSMapFeature.
GSHandle represents a drag handle on a vector shape.
Requires:
svg module
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
GSHandle(parent, point, options)
Constructs a new
GSHandle. |
| Property Attributes | Property Name and Description |
|---|---|
|
The NZMG point this handle is positioned on
|
| Method Attributes | Method Name and Description |
|---|---|
|
Returns
true if this handle is an insert handle |
|
|
setFill(value)
Sets the fill for the current graphics element using the browser-native interface
|
|
|
setOpacity(value)
Sets the overall opacity for this graphics element using the browser-native interface
|
|
|
setStroke(value)
Sets the stroke for the current graphics element using the browser-native interface
|
|
|
setStrokeWidth(value)
Sets the stroke width for the current graphics element using the browser-native interface
|
|
|
setStyle(style)
A hash of name-value pairs describing how this graphics element should be rendered.
|
|
|
setVisible(value)
Sets the visibility of this handle
|
|
|
toString()
Outputs a string representation of this shape
|
- Methods borrowed from class GSMapFeature:
- addContextMenuItem, addEventHandler, addEventListener, addListener, deleteProperty, deselect, disableContextMenu, enableContextMenu, getContextMenu, getProperties, getProperty, isSelectable, isVisible, removeContextMenu, removeContextMenuItem, removeEventHandler, removeEventListener, removeEventListeners, removeListener, select, setContextMenu, setProperty, setTip, setZIndex, showInfoWindow, toJson
| Event Attributes | Event Name and Description |
|---|---|
|
handleDrag(handle)
|
|
|
handleDragEnd(handle)
|
|
|
handleDragStart(handle)
|
|
|
pointDeleted(point)
|
- Events borrowed from class GSMapFeature:
- featureClicked, featureRemoved
Class Detail
GSHandle(parent, point, options)
Constructs a new
GSHandle. This class should not
be instantiated directly.
- Parameters:
- {GSVectorGraphics} parent
- the shape this handle belongs to
- {GSPoint} point
- the NZMG point this handle is positioned on
- {Object} options Optional
- optional parameters to specify for this feature:
- {boolean} options.isInsertHandle
trueif this handle is an insert handle- {boolean} options.visible
trueif the handle should initially be visible- {boolean} options.draggable
trueif the handle should be draggable
Property Detail
{GSPoint}
point
The NZMG point this handle is positioned on
Method Detail
isInsertHandle()
Returns
true if this handle is an insert handle
- Returns:
trueif this handle is an insert handle
setFill(value)
Sets the fill for the current graphics element using the browser-native interface
- Parameters:
- {String} value
- a paint value which may be
noneindicating that no paint is applied, or a color value specified using either an HTML4 keyword, RGB hex value, or rgb(...) functional value
- Returns:
- a reference to this vector graphics map feature
setOpacity(value)
Sets the overall opacity for this graphics element using the browser-native interface
- Parameters:
- {Number} value
- a decimal value in the range of 0.0 (fully transparent) to 1.0 (fully opaque).
- Returns:
- a reference to this vector graphics map feature
setStroke(value)
Sets the stroke for the current graphics element using the browser-native interface
- Parameters:
- {String} value
- a paint value which may be
noneindicating that no paint is applied, or a color value specified using either an HTML4 keyword, RGB hex value, or rgb(...) functional value
- Returns:
- a reference to this vector graphics map feature
setStrokeWidth(value)
Sets the stroke width for the current graphics element using the browser-native interface
- Parameters:
- {int} value
- the new value for the stroke width (in pixels)
- Returns:
- a reference to this vector graphics map feature
setStyle(style)
A hash of name-value pairs describing how this graphics element should be rendered.
- Parameters:
- {Object} style
- a hash of style properties.
setVisible(value)
Sets the visibility of this handle
- Parameters:
- {boolean} value
trueif this feature should be visible on the map
toString()
Outputs a string representation of this shape
Event Detail
handleDrag(handle)
- Parameters:
- {GSHandle} handle
- a reference to the dragged handle
handleDragEnd(handle)
- Parameters:
- {GSHandle} handle
- a reference to the dragged handle
handleDragStart(handle)
- Parameters:
- {GSHandle} handle
- a reference to the dragged handle
pointDeleted(point)
- Parameters:
- {GSPoint} point
- a reference to the deleted pointx