Show:

annie.MouseEvent Class

Extends annie.Event
Defined in: libs/MouseEvent.js:11
Module: annie

Available since 1.0.0

鼠标事件类,电脑端鼠标,移动设备端的触摸都使用此事件来监听

Methods

destroy

() Void public

Inherited from annie.AObject: libs/EventDispatcher.js:55

Available since 2.0.0

销毁一个对象 销毁之前一定要做完其他善后工作,否则有可能会出错

Returns:

Void:

Event

(
  • type
)
public

Inherited from annie.Event: libs/Event.js:20

Available since 1.0.0

Parameters:

MouseEvent

(
  • type
)
public

Defined in libs/MouseEvent.js:20

Available since 1.0.0

Parameters:

reset

(
  • type
  • target
)
Void public

Inherited from annie.Event: libs/Event.js:86

Available since 2.0.0

重置事件到初始状态方便重复利用

Parameters:

Returns:

Void:

stopImmediatePropagation

() Void public

Inherited from annie.Event: libs/Event.js:61

Available since 2.0.0

防止对事件流中当前节点中和所有后续节点中的事件侦听器进行处理。

Returns:

Void:

stopPropagation

() Void public

Inherited from annie.Event: libs/Event.js:71

Available since 2.0.0

防止对事件流中当前节点的后续节点中的所有事件侦听器进行处理。

Returns:

Void:

updateAfterEvent

() Void public

Defined in libs/MouseEvent.js:95

Available since 1.0.9

事件后立即更新显示列表状态

Returns:

Void:

Properties

CLICK

String public static

Defined in libs/MouseEvent.js:129

Available since 1.0.0

annie.DisplayObject鼠标或者手指单击

clientX

Number public

Defined in libs/MouseEvent.js:28

Available since 1.0.0

mouse或touch事件时rootDiv坐标x点

clientY

Number public

Defined in libs/MouseEvent.js:36

Available since 1.0.0

mouse或touch事件时rootDiv坐标y点

currentTarget

annie.DisplayObject public

Defined in libs/MouseEvent.js:76

Available since 1.0.0

绑定此事件的侦听对象

Default: null

data

Any public

Inherited from annie.Event: libs/Event.js:45

Available since 1.0.0

随着事件一起附带的信息对象 所有需要随事件一起发送的信息都可以放在此对象中

Default: null

identifier

Number public

Defined in libs/MouseEvent.js:85

Available since 1.1.2

触摸或者鼠标事件的手指唯一标识

instanceId

Number public

Inherited from annie.AObject: libs/EventDispatcher.js:23

Available since 1.0.0

每一个annie引擎对象都会有一个唯一的id码。

Example:

 //获取 annie引擎类对象唯一码
 console.log(this.instanceId);

instanceType

String public

Inherited from annie.AObject: libs/EventDispatcher.js:41

Available since 1.0.3

每一个annie类都有一个实例类型字符串,通过这个字符串,你能知道这个实例是从哪个类实例而来

localX

Number public

Defined in libs/MouseEvent.js:60

Available since 1.0.0

mouse或touch事件时本地坐标x点

localY

Number public

Defined in libs/MouseEvent.js:68

Available since 1.0.0

mouse或touch事件时本地坐标y点

MOUSE_DOWN

String public static

Defined in libs/MouseEvent.js:111

Available since 1.0.0

annie.DisplayObject鼠标或者手指按下事件

MOUSE_MOVE

String public static

Defined in libs/MouseEvent.js:138

Available since 1.0.0

annie.DisplayObject鼠标或者手指移动事件

MOUSE_OUT

String public static

Defined in libs/MouseEvent.js:156

Available since 1.0.0

annie.DisplayObject鼠标或者手指移出显示对象边界触发的事件

MOUSE_OVER

String public static

Defined in libs/MouseEvent.js:147

Available since 1.0.0

annie.DisplayObject鼠标或者手指移入到显示对象上里触发的事件

MOUSE_UP

String public static

Defined in libs/MouseEvent.js:120

Available since 1.0.0

annie.DisplayObject鼠标或者手指抬起事件

stageX

Number public

Defined in libs/MouseEvent.js:44

Available since 1.0.0

mouse或touch事件时全局坐标x点

stageY

Number public

Defined in libs/MouseEvent.js:52

Available since 1.0.0

mouse或touch事件时全局坐标y点

target

Any public

Inherited from annie.Event: libs/Event.js:36

Available since 1.0.0

触发此事件的对象

Default: null

type

String public

Inherited from annie.Event: libs/Event.js:28

Available since 1.0.0

事件类型名