Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Revision 968065 of GestureEvent

  • Revision slug: Web/API/GestureEvent
  • Revision title: GestureEvent
  • Revision id: 968065
  • Created:
  • Creator: cvrebert
  • Is current revision? No
  • Comment

Revision Content

{{APIRef("DOM Events")}}

{{Non-standard_header()}}

The GestureEvent is a proprietary interface specific to WebKit which gives information regarding multi-touch gestures. Events using this interface include {{event("gesturestart")}}, {{event("gesturechange")}}, and {{event("gestureend")}}.

GestureEvent derives from {{domxref("UIEvent")}}, which in turn derives from {{domxref("Event")}}.

Constructor

{{domxref("GestureEvent.GestureEvent", "GestureEvent()")}}
Creates a GestureEvent object.

Properties

This interface also inherits properties of its parents, {{domxref("UIEvent")}} and {{domxref("Event")}}.

{{domxref("GestureEvent.rotation")}} {{readonlyinline}}
Change in rotation (in degrees) since the event's beginning. Positive values indicate clockwise rotation; negative values indicate anticlockwise rotation. Initial value: 0.0
{{domxref("GestureEvent.scale")}} {{readonlyinline}}
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

Methods

This interface also inherits methods of its parents, {{domxref("UIEvent")}} and {{domxref("Event")}}.

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

Specifications

Not part of any specification. Apple has a description at the Safari Developer Library.

Browser compatibility

This interface is supported in iOS 2.0+.

See also

  • {{event("gesturestart")}}
  • {{event("gesturechange")}}
  • {{event("gestureend")}}
  • {{domxref("MSGestureEvent")}}
  • {{event("MSGestureStart")}}
  • {{event("MSGestureEnd")}}
  • {{event("MSGestureTap")}}
  • {{event("MSGestureHold")}}
  • {{event("MSGestureChange")}}
  • {{event("MSInertiaStart")}}

Revision Source

<p id="Summary">{{APIRef("DOM Events")}}</p>

<p>{{Non-standard_header()}}</p>

<p>The <code><strong>GestureEvent</strong></code> is a proprietary interface specific to WebKit which gives information regarding multi-touch gestures. Events using this interface include {{event("gesturestart")}}, {{event("gesturechange")}}, and {{event("gestureend")}}.</p>

<p><code>GestureEvent</code> derives from {{domxref("UIEvent")}}, which in turn derives from {{domxref("Event")}}.</p>

<h2 id="Constructor">Constructor</h2>

<dl>
 <dt>{{domxref("GestureEvent.GestureEvent", "GestureEvent()")}}</dt>
 <dd>Creates a <code>GestureEvent</code> object.</dd>
</dl>

<h2 id="Properties">Properties</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="Methods">Methods</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="Specifications">Specifications</h2>

<p><em>Not part of any specification.</em> Apple has <a href="https://developer.apple.com/library/iad/documentation/UserExperience/Reference/GestureEventClassReference/index.html">a description at the Safari Developer Library</a>.</p>

<h2 id="Browser_compatibility" name="Browser_compatibility">Browser compatibility</h2>

<p>This interface is supported in iOS 2.0+.</p>

<h2 id="See_also">See also</h2>

<ul>
 <li>{{event("gesturestart")}}</li>
 <li>{{event("gesturechange")}}</li>
 <li>{{event("gestureend")}}</li>
 <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>
Revert to this revision