研究调查问卷:请告诉我们您使用 Blockly 的体验
开始调查问卷
blockly >触摸 >checkTouchIdentifier
Touch.checkTouchIdentifier() 函数
检查事件上的指针标识符是否与当前保存的标识符一致。如果未设置当前标识符,请保存事件中的标识符。这会启动拖动/手势,在此期间将被静默忽略以及其他标识符的指针事件。
Signature:
export declare function checkTouchIdentifier(e: PointerEvent): boolean;
参数
参数 |
类型 |
说明 |
e |
PointerEvent |
指针事件。 |
返回:
布尔值
事件的标识符是否与当前保存的标识符一致。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-09-12。
[null,null,["最后更新时间 (UTC):2024-09-12。"],[[["This function, `checkTouchIdentifier`, assesses if a pointer event's identifier aligns with a stored identifier, initiating a drag/gesture if it's a new interaction."],["During a drag/gesture, events from other pointer identifiers are disregarded, ensuring focus on the primary interaction."],["The function utilizes a `PointerEvent` to extract the identifier and returns a boolean indicating whether the event's identifier matches the saved one."]]],[]]