Skip to main content
Version: 24.38.0

Touchscreen.touchMove() 方法

🌐 Touchscreen.touchMove() method

在第一个激活的触摸上分派一个 touchMove 事件。

🌐 Dispatches a touchMove event on the first touch that is active.

语法

🌐 Signature

class Touchscreen {
touchMove(x: number, y: number): Promise<void>;
}

参数

🌐 Parameters

范围

🌐 Parameter

类型

🌐 Type

描述

🌐 Description

x

number

移动的水平位置。

🌐 Horizontal position of the move.

y

number

移动的垂直位置。

🌐 Vertical position of the move.

返回:

Promise<void>

附注

🌐 Remarks

并非每一个 touchMove 调用都会触发 touchmove 事件,这取决于浏览器的优化。例如,Chrome 会对触摸移动事件进行节流

🌐 Not every touchMove call results in a touchmove event being emitted, depending on the browser's optimizations. For example, Chrome throttles touch move events.