Skip to content

Commit

Permalink
Merge branch 'docs'
Browse files Browse the repository at this point in the history
  • Loading branch information
tilomitra committed Oct 13, 2012
2 parents a6b2654 + 0f4a526 commit a8e5385
Show file tree
Hide file tree
Showing 11 changed files with 509 additions and 309 deletions.
179 changes: 94 additions & 85 deletions build/event-flick/event-flick-coverage.js

Large diffs are not rendered by default.

28 changes: 19 additions & 9 deletions build/event-flick/event-flick-debug.js
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -82,9 +92,9 @@ Y.Event.define('flick', {
this._onStart,
this,
node,
subscriber,
subscriber,
ce);

subscriber[_FLICK_START_HANDLE] = startHandle;
},

Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -182,7 +192,7 @@ Y.Event.define('flick', {
time,
preventDefault,
params,
xyDistance,
xyDistance,
distance,
velocity,
axis,
Expand Down
27 changes: 18 additions & 9 deletions build/event-flick/event-flick.js
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -82,9 +91,9 @@ Y.Event.define('flick', {
this._onStart,
this,
node,
subscriber,
subscriber,
ce);

subscriber[_FLICK_START_HANDLE] = startHandle;
},

Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -182,7 +191,7 @@ Y.Event.define('flick', {
time,
preventDefault,
params,
xyDistance,
xyDistance,
distance,
velocity,
axis,
Expand Down
395 changes: 203 additions & 192 deletions build/event-move/event-move-coverage.js

Large diffs are not rendered by default.

16 changes: 15 additions & 1 deletion build/event-move/event-move-debug.js
Expand Up @@ -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
*/
Expand Down
13 changes: 12 additions & 1 deletion build/event-move/event-move.js
Expand Up @@ -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
*/
Expand Down
8 changes: 8 additions & 0 deletions src/event-gestures/HISTORY.md
@@ -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
-----
Expand Down
28 changes: 19 additions & 9 deletions src/event-gestures/js/Flick.js
@@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -80,9 +90,9 @@ Y.Event.define('flick', {
this._onStart,
this,
node,
subscriber,
subscriber,
ce);

subscriber[_FLICK_START_HANDLE] = startHandle;
},

Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -180,7 +190,7 @@ Y.Event.define('flick', {
time,
preventDefault,
params,
xyDistance,
xyDistance,
distance,
velocity,
axis,
Expand Down
16 changes: 15 additions & 1 deletion src/event-gestures/js/Move.js
Expand Up @@ -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
*/
Expand Down

0 comments on commit a8e5385

Please sign in to comment.