Force Touch events
Force Touch events are a proprietary, Apple-specific feature which makes possible (where supported by the input hardware) new interactions based on how hard the user clicks or presses down on the touchscreen or trackpad.
事件
- Element/webkitmouseforcewillbegin_event
- : This event is fired before the Element/mousedown_event event. Its main use is that it can be Event.preventDefault()ed.
- Element/webkitmouseforcedown_event
- : This event is fired after the Element/mousedown_event event as soon as sufficient pressure has been applied for it to qualify as a "force click".
- Element/webkitmouseforceup_event
- : This event is fired after the Element/webkitmouseforcedown_event event as soon as the pressure has been reduced sufficiently to end the "force click".
- Element/webkitmouseforcechanged_event
- : This event is fired each time the amount of pressure changes. This event first fires after the Element/mousedown_event event and stops firing before the Element/mouseup_event event.
事件属性
The following property is known to be available on the Element/webkitmouseforcewillbegin_event, Element/mousedown_event, Element/webkitmouseforcechanged_event, Element/webkitmouseforcedown_event, Element/webkitmouseforceup_event, Element/mousemove_event, and Element/mouseup_event event objects:
- MouseEvent.webkitForce
- : 当前施加于触控板/触摸屏的压力大小
常量
这些常数对于确定由 MouseEvent.webkitForce 指示的压力的相对强度是有用的:
- MouseEvent.WEBKIT_FORCE_AT_MOUSE_DOWN
- : 正常点击所需的最小力量
- MouseEvent.WEBKIT_FORCE_AT_FORCE_MOUSE_DOWN
- : 强制点击所需的最小力量
规范
*不是任何规格的一部分。*苹果在 Mac 开发者图书馆有一个描述。
来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。
