Class Snapping
Object
|
+--Snapping
- class
Snapping
a Snapping object stores is jsGraphics rendering of a GeometryArray in various mapframes.
Defined in geometry.js
Requires:
Constructor Summary |
Snapping(<String> aTarget, <String> aTolerance, <String> aColor, <Integer> aZIndex)
|
Snapping
Snapping(<String> aTarget, <String> aTolerance, <String> aColor, <Integer> aZIndex)
Parameters:
aTarget
- name of the mapframe where snapping occurs
aTolerance
- Snapping is activated if the mouse is within aTolerance pixel distance to the reference point.
aColor
- apparently deprecated?
aZIndex
- the z-Index of the jsGraphics generated by Highlight.
add
void add(aPoint)
Adds the point to the stored points with snapping property.
Parameters:
point
- which receives snapping property.
addPoint
void addPoint(aPoint)
check
void check(currPoint)
clean
void clean()
cleanHighlight
Object cleanHighlight()
draw
void draw(<Point> center,<Integer> radius)
draws a circle to highlight the snapped point.
Parameters:
center
- the snapped point.
radius
- radius of the circular highlight.
getNearestNeighbour
Object getNearestNeighbour()
getPoint
Object getPoint(i)
getPointCount
Object getPointCount()
getSnappedPoint
Point getSnappedPoint()
Returns the point that is within snapping distance and closest to the mouse cursor.
Returns:
the point (if there is any); else false
getTarget
Object getTarget()
getTolerance
Object getTolerance()
isSnapped
Boolean isSnapped()
Determines whether a point is within snapping distance to the mouse cursor
Returns:
true if a point is within snapping distance; else false
resetIndexOfNearestNeighbour
void resetIndexOfNearestNeighbour()
resetPoints
void resetPoints()
setIndexOfNearestNeighbour
void setIndexOfNearestNeighbour(i)
store
void store(<GeometryArray> geom, <Point> point)
Stores the points which will have the snapping property.
Parameters:
point
- this point is excluded. Useful when moving a point of a geometry; you don't want to snap against the point you move. Optional.
Documentation generated by
JSDoc on Wed Aug 8 10:35:22 2007