Packagecom.yworks.graph.input.snapLines
Classpublic class MovementInfo
InheritanceMovementInfo Inheritance Object
Subclasses BendMovementInfo, EdgeEndMovementInfo, NodeMovementInfo, PortMovementInfo

An abstract helper class that is used in the context of GraphSnapContext to describe the movement of entities during the edit process.

See also

GraphSnapContext
com.yworks.graph.input.snapLines.NodeMovementInfo
com.yworks.graph.input.snapLines.BendMovementInfo
com.yworks.graph.input.snapLines.PortMovementInfo
com.yworks.graph.input.snapLines.EdgeEndMovementInfo


Public Properties
 PropertyDefined By
  currentLocation : IPoint
[read-only] Gets the current location as a live point.
MovementInfo
  horizontalAnchor : MovementInfo
Gets or sets the horizontal movement info to which this info is anchored horizontally.
MovementInfo
  isHorizontallyFixed : Boolean
[read-only] Indicates whether the x coordinate of the item is fixed during the move operation.
MovementInfo
  isVerticallyFixed : Boolean
[read-only] Indicates whether the y coordinate of the item is fixed during the move operation.
MovementInfo
  moveType : uint
Indicates the type of the movement as defined in MoveTypes for this instance.
MovementInfo
  originalLocation : IPoint
[read-only] Gets the original location of the element at the time the editing started.
MovementInfo
  verticalAnchor : MovementInfo
Gets or sets the vertical movement info to which this info is anchored vertically.
MovementInfo
Public Methods
 MethodDefined By
  
MovementInfo(originalLocation:IPoint, moveType:uint)
Initializes a new instance of the MovementInfo class.
MovementInfo
  
getX(dx:Number):Number
Gets the new x coordinate of the element if the mouse has been moved by dx during the gesture.
MovementInfo
  
getY(dy:Number):Number
Gets the new y coordinate of the element if the mouse has been moved by dy during the gesture.
MovementInfo
  
Determines whether this instance moves in sync with the provided info.
MovementInfo
  
Determines whether this instance moves in sync with the provided info.
MovementInfo
Property Detail
currentLocationproperty
currentLocation:IPoint  [read-only]

Gets the current location as a live point.


Implementation
    public function get currentLocation():IPoint
horizontalAnchorproperty 
horizontalAnchor:MovementInfo

Gets or sets the horizontal movement info to which this info is anchored horizontally. This info can be declared to be implicitly anchored to another info. Method movesHorizontallyInSyncWith will try to match against the anchors to determine if two infos are moving in sync.


Implementation
    public function get horizontalAnchor():MovementInfo
    public function set horizontalAnchor(value:MovementInfo):void

See also

isHorizontallyFixedproperty 
isHorizontallyFixed:Boolean  [read-only]

Indicates whether the x coordinate of the item is fixed during the move operation.


Implementation
    public function get isHorizontallyFixed():Boolean
isVerticallyFixedproperty 
isVerticallyFixed:Boolean  [read-only]

Indicates whether the y coordinate of the item is fixed during the move operation.


Implementation
    public function get isVerticallyFixed():Boolean
moveTypeproperty 
moveType:uint

Indicates the type of the movement as defined in MoveTypes for this instance.


Implementation
    public function get moveType():uint
    public function set moveType(value:uint):void

See also

originalLocationproperty 
originalLocation:IPoint  [read-only]

Gets the original location of the element at the time the editing started.


Implementation
    public function get originalLocation():IPoint
verticalAnchorproperty 
verticalAnchor:MovementInfo

Gets or sets the vertical movement info to which this info is anchored vertically. This info can be declared to be implicitly anchored to another info. Method movesVerticallyInSyncWith will try to match against the anchors to determine if two infos are moving in sync.


Implementation
    public function get verticalAnchor():MovementInfo
    public function set verticalAnchor(value:MovementInfo):void

See also

Constructor Detail
MovementInfo()Constructor
public function MovementInfo(originalLocation:IPoint, moveType:uint)

Initializes a new instance of the MovementInfo class. Don't instantiate MovementInfo itself but use one of it's subclasses instead.

Parameters
originalLocation:IPoint — The original location.
 
moveType:uint — The type of the move as defined in MoveTypes.

See also

Method Detail
getX()method
public function getX(dx:Number):Number

Gets the new x coordinate of the element if the mouse has been moved by dx during the gesture. This takes the moveType and originalLocation into account.

Parameters

dx:Number — The delta x coordinate.

Returns
Number — The new x coordinate.

See also

getY()method 
public function getY(dy:Number):Number

Gets the new y coordinate of the element if the mouse has been moved by dy during the gesture. This takes the moveType and originalLocation into account.

Parameters

dy:Number — The delta y coordinate.

Returns
Number — The new y coordinate.

See also

movesHorizontallyInSyncWith()method 
public function movesHorizontallyInSyncWith(info:MovementInfo):Boolean

Determines whether this instance moves in sync with the provided info.

Parameters

info:MovementInfo — The info to check.

Returns
Boolean — Whether this info and the given info move horizontally in sync.

See also

movesVerticallyInSyncWith()method 
public function movesVerticallyInSyncWith(info:MovementInfo):Boolean

Determines whether this instance moves in sync with the provided info.

Parameters

info:MovementInfo — The info to check.

Returns
Boolean — Whether this info and the given info move vertically in sync.

See also