Constructor
new SlideInit(options)
- Source:
Example
new SlideInit({
up() { } // 手指向上滑动
})
Parameters:
Name |
Type |
Description |
options |
Object
|
滑动事件
Properties
Name |
Type |
Description |
up |
function
|
向上滑动 |
down |
function
|
向下滑动 |
left |
function
|
向左滑动 |
right |
function
|
向右滑动 |
|
Methods
getAngle(angx, angy)
- Source:
获得点击角度
Parameters:
Name |
Type |
Description |
angx |
Number
|
|
angy |
Number
|
|
getDirection(startx, starty, endx, endy) → {Number}
- Source:
根据起点终点返回方向
Parameters:
Name |
Type |
Description |
startx |
Number
|
点击屏幕开始 x 下标 |
starty |
Number
|
点击屏幕开始 y 下标 |
endx |
Number
|
点击屏幕结束 x 下标 |
endy |
Number
|
点击屏幕结束 y 下标 |
Returns:
1 向上 2 向下 3 向左 4 向右 0 未滑动
-
Type
-
Number
init(options)
- Source:
初始化函数
Parameters:
Name |
Type |
Description |
options |
Object
|
|