aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/api/gestureevent
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
commit33058f2b292b3a581333bdfb21b8f671898c5060 (patch)
tree51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/web/api/gestureevent
parent8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff)
downloadtranslated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip
initial commit
Diffstat (limited to 'files/zh-cn/web/api/gestureevent')
-rw-r--r--files/zh-cn/web/api/gestureevent/index.html68
1 files changed, 68 insertions, 0 deletions
diff --git a/files/zh-cn/web/api/gestureevent/index.html b/files/zh-cn/web/api/gestureevent/index.html
new file mode 100644
index 0000000000..80ad1fc390
--- /dev/null
+++ b/files/zh-cn/web/api/gestureevent/index.html
@@ -0,0 +1,68 @@
+---
+title: GestureEvent
+slug: Web/API/GestureEvent
+translation_of: Web/API/GestureEvent
+---
+<p id="Summary">{{APIRef("DOM Events")}}</p>
+
+<p>{{Non-standard_header()}}</p>
+
+<p><code><strong>GestureEvent</strong></code> 是 WebKit 的专有接口,提供多点触控的信息。这个接口的事件包括 {{event("gesturestart")}}, {{event("gesturechange")}} 和 {{event("gestureend")}}.</p>
+
+<p><code>GestureEvent</code> 继承自 {{domxref("UIEvent")}},后者又继承自{{domxref("Event")}}。</p>
+
+<h2 id="构造函数">构造函数</h2>
+
+<dl>
+ <dt>{{domxref("GestureEvent.GestureEvent", "GestureEvent()")}}</dt>
+ <dd>Creates a <code>GestureEvent</code> object.</dd>
+</dl>
+
+<h2 id="属性">属性</h2>
+
+<p><em>This interface also inherits properties of its parents, {{domxref("UIEvent")}} and {{domxref("Event")}}.</em></p>
+
+<dl>
+ <dt>{{domxref("GestureEvent.rotation")}} {{readonlyinline}}</dt>
+ <dd>Change in rotation (in degrees) since the event's beginning. Positive values indicate clockwise rotation; negative values indicate anticlockwise rotation. Initial value: <code>0.0</code></dd>
+ <dt>{{domxref("GestureEvent.scale")}} {{readonlyinline}}</dt>
+ <dd>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: <code>1.0</code></dd>
+</dl>
+
+<h2 id="方法">方法</h2>
+
+<p><em>This interface also inherits methods of its parents, {{domxref("UIEvent")}} and {{domxref("Event")}}.</em></p>
+
+<dl>
+ <dt>{{domxref("GestureEvent.initGestureEvent()")}}</dt>
+ <dd>Initializes the value of an <code>GestureEvent</code>. If the event has already being dispatched, this method does nothing.</dd>
+</dl>
+
+<h2 id="手势事件类型">手势事件类型</h2>
+
+<ul>
+ <li>{{event("gesturestart")}}</li>
+ <li>{{event("gesturechange")}}</li>
+ <li>{{event("gestureend")}}</li>
+</ul>
+
+<h2 id="规范">规范</h2>
+
+<p><em>不属于任何规范。苹果在<a href="https://developer.apple.com/library/iad/documentation/UserExperience/Reference/GestureEventClassReference/index.html">Safari Developer Library</a>中描述了这个接口。</em></p>
+
+<h2 id="Browser_compatibility" name="Browser_compatibility">Browser compatibility</h2>
+
+<p><br>
+ {{Compat("api.GestureEvent")}}</p>
+
+<h2 id="参见">参见</h2>
+
+<ul>
+ <li>{{domxref("MSGestureEvent")}}</li>
+ <li>{{event("MSGestureStart")}}</li>
+ <li>{{event("MSGestureEnd")}}</li>
+ <li>{{event("MSGestureTap")}}</li>
+ <li>{{event("MSGestureHold")}}</li>
+ <li>{{event("MSGestureChange")}}</li>
+ <li>{{event("MSInertiaStart")}}</li>
+</ul>