Packagecom.yworks.canvas.input.snapLines
Classpublic class CollectSnapResultEvent
InheritanceCollectSnapResultEvent Inheritance SnapContextEvent Inheritance flash.events.Event

This CollectSnapResultEvent is dispatched by the SnapContext. Registered listener can add SnapResults to this event for the mouse gesture described by the various properties of this event.

See also

addSnapResult


Public Properties
 PropertyDefined By
  context : IInputModeContext
[read-only] Gets the context for the current event.
CollectSnapResultEvent
  delta : IPoint
[read-only] Gets the delta by which the mouse has been actually moved since the initialization.
CollectSnapResultEvent
  newLocation : IPoint
[read-only] Gets the new (current) location of the mouse that is going to be manipulated by the snapping process.
CollectSnapResultEvent
  originalLocation : IPoint
[read-only] Gets the original location of the mouse at the beginning of the gesture.
CollectSnapResultEvent
  snapDistance : Number
[read-only] The zoom invariant snap distance.
CollectSnapResultEvent
Public Methods
 MethodDefined By
  
CollectSnapResultEvent(type:String, inputContext:IInputModeContext, originalLocation:IPoint, newLocation:IPoint, snapDistance:Number, snapResults:Collection, bubbles:Boolean = false, cancelable:Boolean = false)
Constructs a new instance of CollectSnapResultEvent with the given parameter.
CollectSnapResultEvent
  
Adds a SnapResult to the collection of snap results.
CollectSnapResultEvent
  
clone():Event
[override]
CollectSnapResultEvent
Public Constants
 ConstantDefined By
 InheritedCLEANED_UP : String = cleanedUp
[static] Dispatched when the SnapContext has cleaned up itself.
SnapContextEvent
  COLLECT_SNAP_RESULTS : String = collectSnapResults
[static]
CollectSnapResultEvent
 InheritedINITIALIZED : String = initialized
[static] Dispatched when a drag in the SnapContext has been initialized.
SnapContextEvent
 InheritedINITIALIZING : String = initializing
[static] Dispatched when the SnapContext has started to initialize a drag.
SnapContextEvent
Property Detail
contextproperty
context:IInputModeContext  [read-only]

Gets the context for the current event.


Implementation
    public function get context():IInputModeContext
deltaproperty 
delta:IPoint  [read-only]

Gets the delta by which the mouse has been actually moved since the initialization.


Implementation
    public function get delta():IPoint
newLocationproperty 
newLocation:IPoint  [read-only]

Gets the new (current) location of the mouse that is going to be manipulated by the snapping process.


Implementation
    public function get newLocation():IPoint
originalLocationproperty 
originalLocation:IPoint  [read-only]

Gets the original location of the mouse at the beginning of the gesture.


Implementation
    public function get originalLocation():IPoint
snapDistanceproperty 
snapDistance:Number  [read-only]

The zoom invariant snap distance.


Implementation
    public function get snapDistance():Number
Constructor Detail
CollectSnapResultEvent()Constructor
public function CollectSnapResultEvent(type:String, inputContext:IInputModeContext, originalLocation:IPoint, newLocation:IPoint, snapDistance:Number, snapResults:Collection, bubbles:Boolean = false, cancelable:Boolean = false)

Constructs a new instance of CollectSnapResultEvent with the given parameter.

Parameters
type:String — The event type.
 
inputContext:IInputModeContext — The context for which the event is queried.
 
originalLocation:IPoint — The original location of the mouse at the beginning of the gesture.
 
newLocation:IPoint — The new (current) location of the mouse.
 
snapDistance:Number — The zoom invariant snap distance.
 
snapResults:Collection — The collection to store the snap results in.
 
bubbles:Boolean (default = false) — Whether the event bubbles.
 
cancelable:Boolean (default = false) — Whether the event is cancelable.
Method Detail
addSnapResult()method
public function addSnapResult(result:SnapResult):void

Adds a SnapResult to the collection of snap results. null values will be discarded.

Parameters

result:SnapResult — The result to add.

clone()method 
override public function clone():Event

Returns
Event
Constant Detail
COLLECT_SNAP_RESULTSConstant
public static const COLLECT_SNAP_RESULTS:String = collectSnapResults