Permalink
Browse files

Merge branch 'docs'

  • Loading branch information...
2 parents a6b2654 + 0f4a526 commit a8e5385dc64e00ee8c04c1431ed6dd3692845488 @tilomitra tilomitra committed Oct 13, 2012

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -3,19 +3,29 @@ YUI.add('event-flick', function (Y, NAME) {
/**
* The gestures module provides gesture events such as "flick", which normalize user interactions
* across touch and mouse or pointer based input devices. This layer can be used by application developers
- * to build input device agnostic components which behave the same in response to either touch or mouse based
+ * to build input device agnostic components which behave the same in response to either touch or mouse based
* interaction.
*
* <p>Documentation for events added by this module can be found in the event document for the <a href="../classes/YUI.html#events">YUI</a> global.</p>
+ *
+ *
+ @example
+
+ YUI().use('event-flick', function (Y) {
+ Y.one('#myNode').on('flick', function (e) {
+ Y.log('flick event fired. The event payload has goodies.');
+ });
+ });
+
*
* @module event-gestures
*/
/**
- * Adds support for a "flick" event, which is fired at the end of a touch or mouse based flick gesture, and provides
+ * Adds support for a "flick" event, which is fired at the end of a touch or mouse based flick gesture, and provides
* velocity of the flick, along with distance and time information.
*
- * <p>Documentation for the flick event can be found on the <a href="../classes/YUI.html#event_flick">YUI</a> global,
+ * <p>Documentation for the flick event can be found on the <a href="../classes/YUI.html#event_flick">YUI</a> global,
* along with the other supported events.</p>
*
* @module event-gestures
@@ -51,7 +61,7 @@ var GESTURE_MAP = Y.Event._GESTURE_MAP,
* covered is used.
*
* <p>It is recommended that you use Y.bind to set up context and additional arguments for your event handler,
- * however if you want to pass the context and arguments as additional signature arguments to "on",
+ * however if you want to pass the context and arguments as additional signature arguments to "on",
* you need to provide a null value for the configuration object, e.g: <code>node.on("flick", fn, null, context, arg1, arg2, arg3)</code></p>
*
* @event flick
@@ -65,7 +75,7 @@ var GESTURE_MAP = Y.Event._GESTURE_MAP,
* <dt>minVelocity (in pixels/ms, defaults to 0)</dt>
* <dd>The minimum velocity which would qualify the gesture as a flick.</dd>
* <dt>preventDefault (defaults to false)</dt>
- * <dd>Can be set to true/false to prevent default behavior as soon as the touchstart/touchend or mousedown/mouseup is received so that things like scrolling or text selection can be
+ * <dd>Can be set to true/false to prevent default behavior as soon as the touchstart/touchend or mousedown/mouseup is received so that things like scrolling or text selection can be
* prevented. This property can also be set to a function, which returns true or false, based on the event facade passed to it.</dd>
* <dt>axis (no default)</dt>
* <dd>Can be set to "x" or "y" if you want to constrain the flick velocity and distance to a single axis. If not
@@ -82,9 +92,9 @@ Y.Event.define('flick', {
this._onStart,
this,
node,
- subscriber,
+ subscriber,
ce);
-
+
subscriber[_FLICK_START_HANDLE] = startHandle;
},
@@ -129,7 +139,7 @@ Y.Event.define('flick', {
moveHandle,
doc,
preventDefault = subscriber._extra.preventDefault,
- origE = e;
+ origE = e;
if (e.touches) {
start = (e.touches.length === 1);
@@ -182,7 +192,7 @@ Y.Event.define('flick', {
time,
preventDefault,
params,
- xyDistance,
+ xyDistance,
distance,
velocity,
axis,
@@ -3,19 +3,28 @@ YUI.add('event-flick', function (Y, NAME) {
/**
* The gestures module provides gesture events such as "flick", which normalize user interactions
* across touch and mouse or pointer based input devices. This layer can be used by application developers
- * to build input device agnostic components which behave the same in response to either touch or mouse based
+ * to build input device agnostic components which behave the same in response to either touch or mouse based
* interaction.
*
* <p>Documentation for events added by this module can be found in the event document for the <a href="../classes/YUI.html#events">YUI</a> global.</p>
+ *
+ *
+ @example
+
+ YUI().use('event-flick', function (Y) {
+ Y.one('#myNode').on('flick', function (e) {
+ });
+ });
+
*
* @module event-gestures
*/
/**
- * Adds support for a "flick" event, which is fired at the end of a touch or mouse based flick gesture, and provides
+ * Adds support for a "flick" event, which is fired at the end of a touch or mouse based flick gesture, and provides
* velocity of the flick, along with distance and time information.
*
- * <p>Documentation for the flick event can be found on the <a href="../classes/YUI.html#event_flick">YUI</a> global,
+ * <p>Documentation for the flick event can be found on the <a href="../classes/YUI.html#event_flick">YUI</a> global,
* along with the other supported events.</p>
*
* @module event-gestures
@@ -51,7 +60,7 @@ var GESTURE_MAP = Y.Event._GESTURE_MAP,
* covered is used.
*
* <p>It is recommended that you use Y.bind to set up context and additional arguments for your event handler,
- * however if you want to pass the context and arguments as additional signature arguments to "on",
+ * however if you want to pass the context and arguments as additional signature arguments to "on",
* you need to provide a null value for the configuration object, e.g: <code>node.on("flick", fn, null, context, arg1, arg2, arg3)</code></p>
*
* @event flick
@@ -65,7 +74,7 @@ var GESTURE_MAP = Y.Event._GESTURE_MAP,
* <dt>minVelocity (in pixels/ms, defaults to 0)</dt>
* <dd>The minimum velocity which would qualify the gesture as a flick.</dd>
* <dt>preventDefault (defaults to false)</dt>
- * <dd>Can be set to true/false to prevent default behavior as soon as the touchstart/touchend or mousedown/mouseup is received so that things like scrolling or text selection can be
+ * <dd>Can be set to true/false to prevent default behavior as soon as the touchstart/touchend or mousedown/mouseup is received so that things like scrolling or text selection can be
* prevented. This property can also be set to a function, which returns true or false, based on the event facade passed to it.</dd>
* <dt>axis (no default)</dt>
* <dd>Can be set to "x" or "y" if you want to constrain the flick velocity and distance to a single axis. If not
@@ -82,9 +91,9 @@ Y.Event.define('flick', {
this._onStart,
this,
node,
- subscriber,
+ subscriber,
ce);
-
+
subscriber[_FLICK_START_HANDLE] = startHandle;
},
@@ -129,7 +138,7 @@ Y.Event.define('flick', {
moveHandle,
doc,
preventDefault = subscriber._extra.preventDefault,
- origE = e;
+ origE = e;
if (e.touches) {
start = (e.touches.length === 1);
@@ -182,7 +191,7 @@ Y.Event.define('flick', {
time,
preventDefault,
params,
- xyDistance,
+ xyDistance,
distance,
velocity,
axis,

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -7,7 +7,21 @@ YUI.add('event-move', function (Y, NAME) {
*
* <p>Documentation for the gesturemove triplet of events can be found on the <a href="../classes/YUI.html#event_gesturemove">YUI</a> global,
* along with the other supported events.</p>
- *
+
+ @example
+
+ YUI().use('event-move', function (Y) {
+ Y.one('#myNode').on('gesturemovestart', function (e) {
+ Y.log('gesturemovestart Fired.');
+ });
+ Y.one('#myNode').on('gesturemove', function (e) {
+ Y.log('gesturemove Fired.');
+ });
+ Y.one('#myNode').on('gesturemoveend', function (e) {
+ Y.log('gesturemoveend Fired.');
+ });
+ });
+
* @module event-gestures
* @submodule event-move
*/
@@ -7,7 +7,18 @@ YUI.add('event-move', function (Y, NAME) {
*
* <p>Documentation for the gesturemove triplet of events can be found on the <a href="../classes/YUI.html#event_gesturemove">YUI</a> global,
* along with the other supported events.</p>
- *
+
+ @example
+
+ YUI().use('event-move', function (Y) {
+ Y.one('#myNode').on('gesturemovestart', function (e) {
+ });
+ Y.one('#myNode').on('gesturemove', function (e) {
+ });
+ Y.one('#myNode').on('gesturemoveend', function (e) {
+ });
+ });
+
* @module event-gestures
* @submodule event-move
*/
@@ -1,5 +1,13 @@
Gestures Change History
=======================
+3.7.3
+-----
+ * `event-move` supports the -ms-touch-action property in IE10.
+ Nodes subscribing to events defined in event-move will have their
+ styles updated to `-ms-touch-action:none`. It will be reset when
+ listeners are detached.
+
+ http://msdn.microsoft.com/en-us/library/windows/apps/hh767313.aspx
3.7.0
-----
@@ -1,19 +1,29 @@
/**
* The gestures module provides gesture events such as "flick", which normalize user interactions
* across touch and mouse or pointer based input devices. This layer can be used by application developers
- * to build input device agnostic components which behave the same in response to either touch or mouse based
+ * to build input device agnostic components which behave the same in response to either touch or mouse based
* interaction.
*
* <p>Documentation for events added by this module can be found in the event document for the <a href="../classes/YUI.html#events">YUI</a> global.</p>
+ *
+ *
+ @example
+
+ YUI().use('event-flick', function (Y) {
+ Y.one('#myNode').on('flick', function (e) {
+ Y.log('flick event fired. The event payload has goodies.');
+ });
+ });
+
*
* @module event-gestures
*/
/**
- * Adds support for a "flick" event, which is fired at the end of a touch or mouse based flick gesture, and provides
+ * Adds support for a "flick" event, which is fired at the end of a touch or mouse based flick gesture, and provides
* velocity of the flick, along with distance and time information.
*
- * <p>Documentation for the flick event can be found on the <a href="../classes/YUI.html#event_flick">YUI</a> global,
+ * <p>Documentation for the flick event can be found on the <a href="../classes/YUI.html#event_flick">YUI</a> global,
* along with the other supported events.</p>
*
* @module event-gestures
@@ -49,7 +59,7 @@ var GESTURE_MAP = Y.Event._GESTURE_MAP,
* covered is used.
*
* <p>It is recommended that you use Y.bind to set up context and additional arguments for your event handler,
- * however if you want to pass the context and arguments as additional signature arguments to "on",
+ * however if you want to pass the context and arguments as additional signature arguments to "on",
* you need to provide a null value for the configuration object, e.g: <code>node.on("flick", fn, null, context, arg1, arg2, arg3)</code></p>
*
* @event flick
@@ -63,7 +73,7 @@ var GESTURE_MAP = Y.Event._GESTURE_MAP,
* <dt>minVelocity (in pixels/ms, defaults to 0)</dt>
* <dd>The minimum velocity which would qualify the gesture as a flick.</dd>
* <dt>preventDefault (defaults to false)</dt>
- * <dd>Can be set to true/false to prevent default behavior as soon as the touchstart/touchend or mousedown/mouseup is received so that things like scrolling or text selection can be
+ * <dd>Can be set to true/false to prevent default behavior as soon as the touchstart/touchend or mousedown/mouseup is received so that things like scrolling or text selection can be
* prevented. This property can also be set to a function, which returns true or false, based on the event facade passed to it.</dd>
* <dt>axis (no default)</dt>
* <dd>Can be set to "x" or "y" if you want to constrain the flick velocity and distance to a single axis. If not
@@ -80,9 +90,9 @@ Y.Event.define('flick', {
this._onStart,
this,
node,
- subscriber,
+ subscriber,
ce);
-
+
subscriber[_FLICK_START_HANDLE] = startHandle;
},
@@ -127,7 +137,7 @@ Y.Event.define('flick', {
moveHandle,
doc,
preventDefault = subscriber._extra.preventDefault,
- origE = e;
+ origE = e;
if (e.touches) {
start = (e.touches.length === 1);
@@ -180,7 +190,7 @@ Y.Event.define('flick', {
time,
preventDefault,
params,
- xyDistance,
+ xyDistance,
distance,
velocity,
axis,
@@ -5,7 +5,21 @@
*
* <p>Documentation for the gesturemove triplet of events can be found on the <a href="../classes/YUI.html#event_gesturemove">YUI</a> global,
* along with the other supported events.</p>
- *
+
+ @example
+
+ YUI().use('event-move', function (Y) {
+ Y.one('#myNode').on('gesturemovestart', function (e) {
+ Y.log('gesturemovestart Fired.');
+ });
+ Y.one('#myNode').on('gesturemove', function (e) {
+ Y.log('gesturemove Fired.');
+ });
+ Y.one('#myNode').on('gesturemoveend', function (e) {
+ Y.log('gesturemoveend Fired.');
+ });
+ });
+
* @module event-gestures
* @submodule event-move
*/
Oops, something went wrong.

0 comments on commit a8e5385

Please sign in to comment.