C

NodeSnapReferenceProvider

An implementation of the ISnapReferenceProvider interface that provides SnapReferences for INodes.
ImplementsInheritance Hierarchy

Remarks

This implementation uses the GraphSnapContext to create snap lines around the geometric border of the node.

See Also

Developer's Guide

Members

Show:

Constructors

Creates a new provider for the given node.

Parameters

node: INode
The node to provide snap references for.

Methods

Called by addSnapReferences to collect snap lines for the centers of the node.
This method is called by addSnapReferences and by default adds center snap lines to the CollectSnapReferencesEventArgs.
protected

Parameters

context: GraphSnapContext
The context which holds the settings for the snap lines. Note that implementations should not change the state of the context explicitly.
evt: CollectSnapReferencesEventArgs
The argument to use for adding snap lines.
layout: Rect
The layout of the node to use for adding the snap lines.
Adds the snap lines around the border of the node's layout.
This method is called by addSnapReferences.
protected

Parameters

context: GraphSnapContext
The context which holds the settings for the snap lines. Note that implementations should not change the state of the context explicitly.
evt: CollectSnapReferencesEventArgs
The argument to use for adding snap lines.
layout: Rect
The layout of the node to use for adding the snap lines.
Adds the fixed snap lines around the node for other nodes to snap to using the nodeDistance.
This method is called by addSnapReferences and uses the nodeDistance to determine the location of the segments to add around the layout.
protected

Parameters

context: GraphSnapContext
The context which holds the settings for the snap lines. Note that implementations should not change the state of the context explicitly.
evt: CollectSnapReferencesEventArgs
The argument to use for adding snap lines.
layout: Rect
The layout of the node to use for adding the snap lines.
Adds the fixed snap lines around the node for edge segments to snap to.
This method is called by addSnapReferences and uses the nodeToEdgeDistance to determine the location of the segments to add around the layout.
protected

Parameters

context: GraphSnapContext
The context which holds the settings for the snap lines. Note that implementations should not change the state of the context explicitly.
evt: CollectSnapReferencesEventArgs
The argument to use for adding snap lines.
layout: Rect
The layout of the node to use for adding the snap lines.
Called by addSnapReferences to collect snap lines at the node to snap ports to.
This method is called by addSnapReferences.
protected

Parameters

context: GraphSnapContext
The context which holds the settings for the snap lines. Note that implementations should not change the state of the context explicitly.
evt: CollectSnapReferencesEventArgs
The argument to use for adding snap lines.
layout: Rect
The layout of the node to use for adding the snap lines.
Called by the GraphSnapContext when a drag is about to start.
This means that the node will not be moved during the edit and thus can contribute to the set of fixed snap lines. This implementation delegates to addNodeBorderSnapLines, addPortSnapLines, addNodeSnapLines, and addCenterSnapLines.

Parameters

context: GraphSnapContext
The context which holds the settings for the snap lines. Note that implementations should not change the state of the context explicitly.
evt: CollectSnapReferencesEventArgs
The argument to use for adding snap lines.
Creates a snap line for the center of the node.
protected

Parameters

context: GraphSnapContext
The context which holds the settings for the snap lines. Note that implementations should not change the state of the context explicitly.
orientation: SnapLineOrientation
The snap line orientation.
location: Point
The location of the snap line.

Return Value

OrthogonalSnapLine
A snap line that other centers can snap to.

Fields

The node this provider was created for.
protectedfinal