Packagecom.yworks.graph.input.snapLines
Classpublic class EdgeSnapLineProvider
InheritanceEdgeSnapLineProvider Inheritance Object
Implements ISnapLineProvider

Simple implementation of the ISnapLineProvider interface that can be used to add snap lines for orthogonally routed IEdges. This implementation can be put into the ILookup of an IEdge.

See also

IEdge
ILookup
com.yworks.graph.model.EdgeDecorator.snapLineProviderDecorator


Public Methods
 MethodDefined By
  
Adds the snap lines for the given model item to the evt.
EdgeSnapLineProvider
Protected Methods
 MethodDefined By
  
addHorizontalSegmentSnapLines(context:GraphSnapContext, evt:CollectSnapLinesEvent, edge:IEdge, segmentStart:IPoint, segmentEnd:IPoint):void
Adds horizontal snap lines for a horizontally oriented fixed segment snap lines.
EdgeSnapLineProvider
  
addVerticalSegmentSnapLines(context:GraphSnapContext, evt:CollectSnapLinesEvent, edge:IEdge, segmentStart:IPoint, segmentEnd:IPoint):void
Adds vertical snap lines for a vertically oriented fixed segment snap lines.
EdgeSnapLineProvider
Public Constants
 ConstantDefined By
  instance : ISnapLineProvider
[static]
EdgeSnapLineProvider
Method Detail
addHorizontalSegmentSnapLines()method
protected function addHorizontalSegmentSnapLines(context:GraphSnapContext, evt:CollectSnapLinesEvent, edge:IEdge, segmentStart:IPoint, segmentEnd:IPoint):void

Adds horizontal snap lines for a horizontally oriented fixed segment snap lines.

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:CollectSnapLinesEvent — The event to use for adding snap lines.
 
edge:IEdge — The edge to add snap lines for.
 
segmentStart:IPoint — The start of the segment.
 
segmentEnd:IPoint — The end of the segment.

See also

addSnapLines()method 
public function addSnapLines(context:GraphSnapContext, evt:CollectSnapLinesEvent, item:IModelItem):void

Adds the snap lines for the given model item to the evt. This implementation queries the movement information for the provided edge to determine which edge segments stay fixed. For each fixed segment, it will call addVerticalSegmentSnapLines or addHorizontalSegmentSnapLines respectively.

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:CollectSnapLinesEvent — The event to use for adding snap lines.
 
item:IModelItem — The item to add snap lines for.

See also

addVerticalSegmentSnapLines()method 
protected function addVerticalSegmentSnapLines(context:GraphSnapContext, evt:CollectSnapLinesEvent, edge:IEdge, segmentStart:IPoint, segmentEnd:IPoint):void

Adds vertical snap lines for a vertically oriented fixed segment snap lines.

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:CollectSnapLinesEvent — The event to use for adding snap lines.
 
edge:IEdge — The edge to add snap lines for.
 
segmentStart:IPoint — The start of the segment.
 
segmentEnd:IPoint — The end of the segment.

See also

Constant Detail
instanceConstant
public static const instance:ISnapLineProvider