GestureEvent

翻译不完整。 请帮助我们翻译这篇文章!

非标准
该特性是非标准的,请尽量不要在生产环境中使用它!

GestureEvent 是 WebKit 的专有接口,提供多点触控的信息。这个接口的事件包括 gesturestart, gesturechangegestureend.

GestureEvent 继承自 UIEvent,后者又继承自Event

构造函数

GestureEvent()
Creates a GestureEvent object.

属性

This interface also inherits properties of its parents, UIEvent and Event.

GestureEvent.rotation 只读
Change in rotation (in degrees) since the event's beginning. Positive values indicate clockwise rotation; negative values indicate anticlockwise rotation. Initial value: 0.0
GestureEvent.scale 只读
Distance between two digits since the event's beginning. Expressed as a floating-point multiple of the initial distance between the digits at the beginning of the gesture. Values below 1.0 indicate an inward pinch (zoom out). Values above 1.0 indicate an outward unpinch (zoom in). Initial value: 1.0

方法

This interface also inherits methods of its parents, UIEvent and Event.

GestureEvent.initGestureEvent()
Initializes the value of an GestureEvent. If the event has already being dispatched, this method does nothing.

手势事件类型

规范

不属于任何规范。苹果在Safari Developer Library中描述了这个接口。

Browser compatibility


Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
GestureEvent
Non-standard
Chrome No support NoEdge No support NoFirefox No support NoIE No support NoOpera No support NoSafari Full support 9WebView Android No support NoChrome Android No support NoFirefox Android No support NoOpera Android No support NoSafari iOS Full support 2Samsung Internet Android No support No
GestureEvent() constructor
Non-standard
Chrome No support NoEdge No support NoFirefox No support NoIE No support NoOpera No support NoSafari Full support 9WebView Android No support NoChrome Android No support NoFirefox Android No support NoOpera Android No support NoSafari iOS Full support 2Samsung Internet Android No support No
initGestureEvent
Non-standard
Chrome No support NoEdge No support NoFirefox No support NoIE No support NoOpera No support NoSafari Full support 9WebView Android No support NoChrome Android No support NoFirefox Android No support NoOpera Android No support NoSafari iOS Full support 2Samsung Internet Android No support No
rotation
Non-standard
Chrome No support NoEdge No support NoFirefox No support NoIE No support NoOpera No support NoSafari Full support 9WebView Android No support NoChrome Android No support NoFirefox Android No support NoOpera Android No support NoSafari iOS Full support 2Samsung Internet Android No support No
scale
Non-standard
Chrome No support NoEdge No support NoFirefox No support NoIE No support NoOpera No support NoSafari Full support 9WebView Android No support NoChrome Android No support NoFirefox Android No support NoOpera Android No support NoSafari iOS Full support 2Samsung Internet Android No support No

Legend

Full support  
Full support
No support  
No support
Non-standard. Expect poor cross-browser support.
Non-standard. Expect poor cross-browser support.

参见