new Ycc.Gesture(option)
| Name | Type | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
option |
|
Extends
Members
-
disableTypeObject
-
被禁用的事件类型。key为type,val为boolean
-
listenersObject
-
所有的监听器。key为type,val为listener数组。
-
onclickfunction
-
点击 的监听。默认为null
-
ondragendfunction
-
拖拽结束 的监听。默认为null
-
ondraggingfunction
-
拖拽 的监听。默认为null
-
ondragstartfunction
-
拖拽开始 的监听。默认为null
-
onmousedownfunction
-
鼠标按下 的监听。默认为null
-
onmousemovefunction
-
鼠标移动 的监听。默认为null
-
onmouseoutfunction
-
鼠标移出 的监听。默认为null
-
onmouseoverfunction
-
鼠标移入 的监听。默认为null
-
onmouseupfunction
-
鼠标抬起 的监听。默认为null
-
ontapfunction
-
点击事件 的监听。默认为null
-
ontouchendfunction
-
触摸结束 的监听。默认为null
-
ontouchmovefunction
-
触摸移动 的监听。默认为null
-
ontouchstartfunction
-
触摸开始 的监听。默认为null
-
optionObject
-
-
stopAllEventboolean
-
只会阻止当前UI事件的触发,不会阻止其下面子元素事件的触发
-
stopTypeObject
-
被阻止的事件类型。key为type,val为boolean
Methods
-
inherited addListener(type, listener)
-
添加某个类型的监听器
Name Type Description typestring listenerfunction -
inherited disableEvent(type)
-
禁止某个事件触发
Name Type Description type -
enableMutiTouch(enable)
-
设置是否启用多点触控
Name Type Description enable -
inherited removeListener(type, listener)
-
移除某个类型的监听器
Name Type Description typelistener -
inherited resumeEvent(type)
-
恢复某个事件的触发
Name Type Description type -
inherited stop(type)
-
阻止某个事件类型继续传递
Name Type Description type -
inherited triggerListener(type, data)
-
触发某一类型的监听器
Name Type Description typedata