Package | com.yworks.canvas.input.snapLines |
Class | public class CollectSnapResultEvent |
Inheritance | CollectSnapResultEvent SnapContextEvent flash.events.Event |
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
Property | Defined 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 |
Method | Defined 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 | ||
addSnapResult(result:SnapResult):void
Adds a SnapResult to the collection of snap results. | CollectSnapResultEvent | ||
clone():Event [override] | CollectSnapResultEvent |
Constant | Defined By | ||
---|---|---|---|
CLEANED_UP : String = cleanedUp [static]
Dispatched when the SnapContext has cleaned up itself. | SnapContextEvent | ||
COLLECT_SNAP_RESULTS : String = collectSnapResults [static]
| CollectSnapResultEvent | ||
INITIALIZED : String = initialized [static]
Dispatched when a drag in the SnapContext has been initialized. | SnapContextEvent | ||
INITIALIZING : String = initializing [static]
Dispatched when the SnapContext has started to initialize a drag. | SnapContextEvent |
context | property |
context:IInputModeContext
[read-only] Gets the context for the current event.
public function get context():IInputModeContext
delta | property |
delta:IPoint
[read-only] Gets the delta by which the mouse has been actually moved since the initialization.
public function get delta():IPoint
newLocation | property |
newLocation:IPoint
[read-only] Gets the new (current) location of the mouse that is going to be manipulated by the snapping process.
public function get newLocation():IPoint
originalLocation | property |
originalLocation:IPoint
[read-only] Gets the original location of the mouse at the beginning of the gesture.
public function get originalLocation():IPoint
snapDistance | property |
snapDistance:Number
[read-only] The zoom invariant snap distance.
public function get snapDistance():Number
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.
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.
|
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
ReturnsEvent |
COLLECT_SNAP_RESULTS | Constant |
public static const COLLECT_SNAP_RESULTS:String = collectSnapResults