Class GSHandle

Extends GSMapFeature.

GSHandle represents a drag handle on a vector shape.

Requires: svg module

Class Summary
Constructor Attributes Constructor Name and Description
 
GSHandle(parent, point, options)
Constructs a new GSHandle.
Property Summary
Property Attributes Property Name and Description
 
The NZMG point this handle is positioned on
Method Summary
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
 
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
 
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 Summary
Event Attributes Event Name and Description
 
handleDrag(handle)
 
handleDragEnd(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
true if this handle is an insert handle
{boolean} options.visible
true if the handle should initially be visible
{boolean} options.draggable
true if 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:
true if 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 none indicating 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 none indicating 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
true if 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

Documentation generated by JsDoc Toolkit 2.3.2 on Wed Mar 07 2012 11:47:28 GMT+1300 (NZDT)