Class adf.EditingDrawLineAction
Extends
adf.EditingDrawAction.
Defined in: EditTask.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Extends adf.EditingDrawAction to handle user interaction with the mouse to draw a line graphic
which contains only two points.
|
- 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, name, symbol
Method Attributes | Method Name and Description |
---|---|
activate(element, callBack, continuousCallBack, graphicsElement, saveState)
This method activates the action and registers the required event listeners.
|
|
Deactivates the event listeners set by this action
|
|
Reactivates the action
|
|
setSnapGraphicsSymbol(symbol)
|
- Methods borrowed from class adf.EditingDrawAction:
- clearSnapGraphics
Class Detail
adf.EditingDrawLineAction()
Extends adf.EditingDrawAction to handle user interaction with the mouse to draw a line graphic
which contains only two points.
Method Detail
activate(element, callBack, continuousCallBack, graphicsElement, saveState)
This method activates the action and registers the required event listeners. The call back parameters,
callBack(fromPoint, toPoint)
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
and the callback gets the both digitized points fo the line to be sent to the server. Both these callbacks receive second argument which tells the
ToolItem whether this point is a map coordinate or screen coordinate. If its a snapped point , its a map coordinate
continousCallBack(point,isSnapPoint)
will recieve the
point each time the browser fires the onmousemove
, while callback()
will only recieve a call
when the browser fires the onmouseup
event after the line drawing has finished.
- Parameters:
- {DOMNode} 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} continuousCallBack
- Continuous 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 is to be saved.when true, then this action's toolitem editingtoolitem which is added to the EditingState Collection
deactivate()
Deactivates the event listeners set by this action
reactivate()
Reactivates the action
resetSnappingGraphicsSymbol()
setSnapGraphicsSymbol(symbol)
- Parameters:
- symbol