Packagecom.yworks.canvas.input
Classpublic class CanvasMouseEvent
InheritanceCanvasMouseEvent Inheritance flash.events.Event

This events wraps all MouseEvents on the stage and includes additional properties related to the CanvasComponent.

The wrapped events can be accessed via the mouseEvent property.



Public Properties
 PropertyDefined By
  altKey : Boolean
[read-only] Indicates whether the Alt key is active (true) or inactive (false).
CanvasMouseEvent
  buttonDown : Boolean
[read-only] Indicates whether the primary mouse button is pressed (true) or not (false).
CanvasMouseEvent
  canvasHit : Boolean
[read-only] Returns whether the event occured inside the bounds of the CanvasComponent.
CanvasMouseEvent
  canvasMouseDown : Boolean
[read-only] Returns whether the last mouse down event occured over the canvas and there was no mouse up event since then, which means that a mouse drag was started on the canvas area.
CanvasMouseEvent
  clickCount : int
[read-only] The number of times the mouse button was clicked.
CanvasMouseEvent
  ctrlKey : Boolean
[read-only] Indicates whether the Ctrl key is active (true) or inactive (false).
CanvasMouseEvent
  delta : int
[read-only] Indicates how many lines should be scrolled for each unit the user rotates the mouse wheel.
CanvasMouseEvent
  localX : Number
[read-only] The horizontal coordinate at which the event occurred relative to the containing sprite.
CanvasMouseEvent
  localY : Number
[read-only] The vertical coordinate at which the event occurred relative to the containing sprite.
CanvasMouseEvent
  mouseEvent : MouseEvent
[read-only] The event which has originally triggered sending this event.
CanvasMouseEvent
  shiftKey : Boolean
[read-only] Indicates whether the Shift key is active (true) or inactive (false).
CanvasMouseEvent
  stageX : Number
[read-only] The horizontal coordinate at which the event occurred in global Stage coordinates.
CanvasMouseEvent
  stageY : Number
[read-only] The vertical coordinate at which the event occurred in global Stage coordinates.
CanvasMouseEvent
  viewCoords : IPoint
[read-only] The view coordinates at which the event occurred.
CanvasMouseEvent
  viewX : Number
[read-only] The horizontal view coordinate at which the event occurred.
CanvasMouseEvent
  viewY : Number
[read-only] The vertical view coordinate at which the event occurred.
CanvasMouseEvent
  worldCoords : IPoint
[read-only] The world coordinates at which the event occurred.
CanvasMouseEvent
  worldX : Number
[read-only] The horizontal world coordinate at which the event occurred.
CanvasMouseEvent
  worldY : Number
[read-only] The vertical world coordinate at which the event occurred.
CanvasMouseEvent
Public Methods
 MethodDefined By
  
CanvasMouseEvent(evt:MouseEvent, viewCoords:IPoint, worldCoords:IPoint, canvasHit:Boolean, canvasMouseDown:Boolean, clickCount:uint = 0, type:String = null)
Creates a new instance using the given MouseEvent as base.
CanvasMouseEvent
  
clone():Event
[override]
CanvasMouseEvent
Public Constants
 ConstantDefined By
  CANVAS_MOUSE_CLICK : String = canvasMouseClick
[static]
CanvasMouseEvent
  CANVAS_MOUSE_DOUBLE_CLICK : String = canvasMouseDoubleClick
[static] This event is deprecated.
CanvasMouseEvent
  CANVAS_MOUSE_DOWN : String = canvasMouseDown
[static]
CanvasMouseEvent
  CANVAS_MOUSE_DRAG : String = canvasMouseDrag
[static]
CanvasMouseEvent
  CANVAS_MOUSE_MOVE : String = canvasMouseMove
[static]
CanvasMouseEvent
  CANVAS_MOUSE_NONE : String = canvasMouseNone
[static]
CanvasMouseEvent
  CANVAS_MOUSE_OUT : String = canvasMouseOut
[static]
CanvasMouseEvent
  CANVAS_MOUSE_OVER : String = canvasMouseOver
[static]
CanvasMouseEvent
  CANVAS_MOUSE_UP : String = canvasMouseUp
[static]
CanvasMouseEvent
  CANVAS_MOUSE_WHEEL : String = canvasMouseWheel
[static]
CanvasMouseEvent
  CANVAS_ROLL_OUT : String = canvasRollOut
[static]
CanvasMouseEvent
  CANVAS_ROLL_OVER : String = canvasRollOver
[static]
CanvasMouseEvent
Property Detail
altKeyproperty
altKey:Boolean  [read-only]

Indicates whether the Alt key is active (true) or inactive (false). Supported for Windows operating systems only.

This implementation delegates to the wrapped MouseEvent


Implementation
    public function get altKey():Boolean

See also

flash.events.MouseEvent.altKey
buttonDownproperty 
buttonDown:Boolean  [read-only]

Indicates whether the primary mouse button is pressed (true) or not (false).

This implementation delegates to the wrapped MouseEvent


Implementation
    public function get buttonDown():Boolean

See also

flash.events.MouseEvent.buttonDown
canvasHitproperty 
canvasHit:Boolean  [read-only]

Returns whether the event occured inside the bounds of the CanvasComponent.


Implementation
    public function get canvasHit():Boolean
canvasMouseDownproperty 
canvasMouseDown:Boolean  [read-only]

Returns whether the last mouse down event occured over the canvas and there was no mouse up event since then, which means that a mouse drag was started on the canvas area.


Implementation
    public function get canvasMouseDown():Boolean
clickCountproperty 
clickCount:int  [read-only]

The number of times the mouse button was clicked.


Implementation
    public function get clickCount():int
ctrlKeyproperty 
ctrlKey:Boolean  [read-only]

Indicates whether the Ctrl key is active (true) or inactive (false). On Macintosh, indicates whether either the Ctrl key or the Command key is activated.

This implementation delegates to the wrapped MouseEvent


Implementation
    public function get ctrlKey():Boolean

See also

flash.events.MouseEvent.ctrlKey
deltaproperty 
delta:int  [read-only]

Indicates how many lines should be scrolled for each unit the user rotates the mouse wheel. A positive delta value indicates an upward scroll; a negative value indicates a downward scroll. Typical values are 1 to 3, but faster rotation may produce larger values. This setting depends on the device and operating system and is usually configurable by the user. This property applies only to the MouseEvent.mouseWheel event.

This implementation delegates to the wrapped MouseEvent


Implementation
    public function get delta():int

See also

flash.events.MouseEvent.delta
localXproperty 
localX:Number  [read-only]

The horizontal coordinate at which the event occurred relative to the containing sprite.

This implementation delegates to the wrapped MouseEvent


Implementation
    public function get localX():Number

See also

flash.events.MouseEvent.localX
localYproperty 
localY:Number  [read-only]

The vertical coordinate at which the event occurred relative to the containing sprite.

This implementation delegates to the wrapped MouseEvent


Implementation
    public function get localY():Number

See also

flash.events.MouseEvent.localY
mouseEventproperty 
mouseEvent:MouseEvent  [read-only]

The event which has originally triggered sending this event.


Implementation
    public function get mouseEvent():MouseEvent
shiftKeyproperty 
shiftKey:Boolean  [read-only]

Indicates whether the Shift key is active (true) or inactive (false).

This implementation delegates to the wrapped MouseEvent


Implementation
    public function get shiftKey():Boolean

See also

flash.events.MouseEvent.shiftKey
stageXproperty 
stageX:Number  [read-only]

The horizontal coordinate at which the event occurred in global Stage coordinates.


Implementation
    public function get stageX():Number

See also

flash.events.MouseEvent.stageX
stageYproperty 
stageY:Number  [read-only]

The vertical coordinate at which the event occurred in global Stage coordinates.


Implementation
    public function get stageY():Number

See also

flash.events.MouseEvent.stageY
viewCoordsproperty 
viewCoords:IPoint  [read-only]

The view coordinates at which the event occurred.


Implementation
    public function get viewCoords():IPoint
viewXproperty 
viewX:Number  [read-only]

The horizontal view coordinate at which the event occurred.


Implementation
    public function get viewX():Number
viewYproperty 
viewY:Number  [read-only]

The vertical view coordinate at which the event occurred.


Implementation
    public function get viewY():Number
worldCoordsproperty 
worldCoords:IPoint  [read-only]

The world coordinates at which the event occurred.


Implementation
    public function get worldCoords():IPoint
worldXproperty 
worldX:Number  [read-only]

The horizontal world coordinate at which the event occurred.


Implementation
    public function get worldX():Number
worldYproperty 
worldY:Number  [read-only]

The vertical world coordinate at which the event occurred.


Implementation
    public function get worldY():Number
Constructor Detail
CanvasMouseEvent()Constructor
public function CanvasMouseEvent(evt:MouseEvent, viewCoords:IPoint, worldCoords:IPoint, canvasHit:Boolean, canvasMouseDown:Boolean, clickCount:uint = 0, type:String = null)

Creates a new instance using the given MouseEvent as base.

Parameters
evt:MouseEvent — The mouse event which triggered the creation of this event.
 
viewCoords:IPoint — The view coordinates.
 
worldCoords:IPoint — The world coordinates.
 
canvasHit:Boolean — Whether the mouse is over the canvas.
 
canvasMouseDown:Boolean — Whether the last mouse down event occured over the canvas and there was no mouse up event since then.
 
clickCount:uint (default = 0) — The number of times the mouse button was clicked.
 
type:String (default = null) — The type of the event. If none is given, the type will be determined using the MouseEvent's type.
Method Detail
clone()method
override public function clone():Event

Returns
Event
Constant Detail
CANVAS_MOUSE_CLICKConstant
public static const CANVAS_MOUSE_CLICK:String = canvasMouseClick

CANVAS_MOUSE_DOUBLE_CLICKConstant 
public static const CANVAS_MOUSE_DOUBLE_CLICK:String = canvasMouseDoubleClick

This event is deprecated. Please use CANVAS_MOUSE_CLICK and the event's clickCount property instead.

CANVAS_MOUSE_DOWNConstant 
public static const CANVAS_MOUSE_DOWN:String = canvasMouseDown

CANVAS_MOUSE_DRAGConstant 
public static const CANVAS_MOUSE_DRAG:String = canvasMouseDrag

CANVAS_MOUSE_MOVEConstant 
public static const CANVAS_MOUSE_MOVE:String = canvasMouseMove

CANVAS_MOUSE_NONEConstant 
public static const CANVAS_MOUSE_NONE:String = canvasMouseNone

CANVAS_MOUSE_OUTConstant 
public static const CANVAS_MOUSE_OUT:String = canvasMouseOut

CANVAS_MOUSE_OVERConstant 
public static const CANVAS_MOUSE_OVER:String = canvasMouseOver

CANVAS_MOUSE_UPConstant 
public static const CANVAS_MOUSE_UP:String = canvasMouseUp

CANVAS_MOUSE_WHEELConstant 
public static const CANVAS_MOUSE_WHEEL:String = canvasMouseWheel

CANVAS_ROLL_OUTConstant 
public static const CANVAS_ROLL_OUT:String = canvasRollOut

CANVAS_ROLL_OVERConstant 
public static const CANVAS_ROLL_OVER:String = canvasRollOver