A snap line is a line segment in the world coordinate system to which other items (lines or points) snap during interactive movements.
Inheritance Hierarchy
Remarks
GraphSnapContext makes use of this class to interactively snap moving elements to snap lines.
Members
Show:
Constructors
Parameters
- visualizationType: SnapReferenceVisualizationType
- The type of the visual representation of this snap line.
- coordinates: Point
- The coordinates of the center point of the snap line.
- from: Point
- The first location that delimits this snap line.
- to: Point
- The second location that delimits this snap line.
- weight: number
- The weight (importance) of this snap line. If more than one snap line is snapped to, the one with the greater weight will be used.
- snappableItems?: GraphItemTypes
- The graph item types that may snap to this snap reference.
- tag?: any
- A tag that is associated with this snap line - see tag for a typical use of this value.
Properties
Gets the coordinates of the center point of the snap line.
Gets the coordinates of the center point of the snap line.
readonlyfinal
Gets or sets the first location that delimits this snap line.
Gets or sets the first location that delimits this snap line.
conversionfinal
Gets which types of items may snap to this snap reference.
Gets which types of items may snap to this snap reference.
readonlyfinal
Defined in
SnapReference.snappableItemsThe tag is most commonly used for the snap result tag.
readonlyfinal
Defined in
SnapReference.tagGets or sets the second location that delimits this snap line.
Gets or sets the second location that delimits this snap line.
conversionfinal
Gets the visualization type which determines the visual appearance of the snap line.
Gets the visualization type which determines the visual appearance of the snap line.
readonlyfinal
Greater values indicate greater importance.
readonlyfinal
Defined in
SnapReference.weightMethods
Collects a valid SnapResult that snaps the movedPoint to this line.
Collects a valid SnapResult that snaps the
movedPoint to this line.A snap result is considered to be valid if the projection of the movedPoint onto this line hits the snap line and the distance between the moved and the projected point is not bigger than the snapDistance.
If a valid SnapResult is found, it is added to the evt and returned.
Parameters
- evt: CollectSnapResultsEventArgs
- The arguments describing the movement the SnapResult shall be created for.
- movedItem: IModelItem
- The item that is currently moved.
- movedPoint: Point
- The location that shall be snapped to the line.
Return Value
- SnapResult
- A valid snap result on this line or
nullif no such snap result could be found.