Class adf.EditingDrawPolyShapeAction
Extends
adf.EditingDrawAction.
Defined in: EditTask.js.
Constructor Attributes | Constructor Name and Description |
---|---|
adf.EditingDrawPolyShapeAction(isPolygon)
Extends adf.EditingDrawAction to handle user interaction with the mouse in order to draw a polygon or polyline
onto an adf.graphics.Element.
|
Field Attributes | Field Name and Description |
---|---|
Name of this action
|
- Fields borrowed from class adf.EditingDrawAction:
- clickTolerance, fillColor, fillOpacity, isEditing, lineOpacity, snapColor, snapDistance, snapGraphics, snappedPoint, snappedScreenPoint, snapping, snapPoint, snapRequestedPoint, snapSymbol, snapText, snapWidth
- Fields borrowed from class adf.Action:
- cursor, graphicsZIndex, symbol
Method Attributes | Method Name and Description |
---|---|
activate(element, callBack, continuousCallBackContinuous, graphicsElement, saveState)
This method activates the action and registers the required event listeners
The call back parameters
callBack(points) and continuousCallBack(point, isSnapPoint) ,
receive the position of the mouse when called (both as adf.Point ). |
|
Deactivates the event listeners set by this action
|
|
Reactivates the action
|
|
setSnapGraphicsSymbol(symbol)
|
- Methods borrowed from class adf.EditingDrawAction:
- clearSnapGraphics
Class Detail
adf.EditingDrawPolyShapeAction(isPolygon)
Extends adf.EditingDrawAction to handle user interaction with the mouse in order to draw a polygon or polyline
onto an adf.graphics.Element.
- Parameters:
- {Boolean} isPolygon
- true: draws polygon otherise draws polyline
Field Detail
{String}
name
Name of this action
- Default Value:
- "adf.EditingDrawPolygonAction"
Method Detail
activate(element, callBack, continuousCallBackContinuous, graphicsElement, saveState)
This method activates the action and registers the required event listeners
The call back parameters
callBack(points)
and continuousCallBack(point, isSnapPoint)
,
receive the position of the mouse when called (both as adf.Point ).
The continuosCallback gets the point which may be a snap request point or the digitized point based on the whether isSnapPoint is provided or not.
when defined this is a snapped Point which means , this point is part of digitized geometry
This boolean further tells whether its a map coordinate (true) or screen coordinate (false)
The callback recieves the set of all the digitized points part of this PolyShape to be sent to the server
continousCallBack()
will recieve the
point each time the browser fires the onmouseup
, while callback()
will only recieve a call
when the browser fires the ondblclick
event after the polyshaope drawing has finished.
- Parameters:
- {HTMLElement} element
- The HTMLElement that is the action's container on which the events are attached
- {Function} callBack
- callback function to be called after action is completed
- {Function} continuousCallBackContinuous
- Callback function is called as the line is being drawn
- {adf.graphics.Element} graphicsElement
- Parameter to set Graphics Container for the action.
- {Boolean} saveState
- Is the digitized graphics be saved . when true, this action's toolitem is part of the editingtoolitem in the EditingState Collection
deactivate()
Deactivates the event listeners set by this action
reactivate()
Reactivates the action
resetSnappingGraphicsSymbol()
setSnapGraphicsSymbol(symbol)
- Parameters:
- symbol