~bjornt/lazr-js/prefetch-yui-3.5

« back to all changes in this revision

Viewing changes to src-js/lazrjs/yui/event-gestures/event-gestures-debug.js

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-01-14 23:32:29 UTC
  • mfrom: (197.1.7 yui-3.3.0)
  • Revision ID: launchpad@pqm.canonical.com-20110114233229-r6i4cazdiiw18o7p
Upgrade to YUI 3.3.0 [r=mars]

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
3
3
Code licensed under the BSD License:
4
4
http://developer.yahoo.com/yui/license.html
5
 
version: 3.2.0
6
 
build: 2676
 
5
version: 3.3.0
 
6
build: 3167
7
7
*/
8
8
YUI.add('event-flick', function(Y) {
9
9
 
213
213
                    endEvent.pageY - start.pageY
214
214
                ];
215
215
 
216
 
                axis = params.axis || (Math.abs(xyDistance[0]) >= Math.abs(xyDistance[1])) ? 'x' : 'y';
 
216
                if (params.axis) {
 
217
                    axis = params.axis;
 
218
                } else {
 
219
                    axis = (Math.abs(xyDistance[0]) >= Math.abs(xyDistance[1])) ? 'x' : 'y';
 
220
                }
 
221
 
217
222
                distance = xyDistance[(axis === 'x') ? 0 : 1];
218
223
                velocity = (time !== 0) ? distance/time : 0;
219
224
 
243
248
});
244
249
 
245
250
 
246
 
}, '3.2.0' ,{requires:['node-base','event-touch','event-synthetic']});
 
251
}, '3.3.0' ,{requires:['node-base','event-touch','event-synthetic']});
247
252
YUI.add('event-move', function(Y) {
248
253
 
249
254
/**
317
322
        touchFacade.screenY = touch.screenY;
318
323
        touchFacade.clientX = touch.clientX;
319
324
        touchFacade.clientY = touch.clientY;
320
 
        touchFacade[TARGET] = touch[TARGET] || touchFacade[TARGET];
321
 
        touchFacade[CURRENT_TARGET] = touch[CURRENT_TARGET] || touchFacade[CURRENT_TARGET];
 
325
        touchFacade[TARGET] = touchFacade[TARGET] || touch[TARGET];
 
326
        touchFacade[CURRENT_TARGET] = touchFacade[CURRENT_TARGET] || touch[CURRENT_TARGET];
322
327
 
323
328
        touchFacade[BUTTON] = (params && params[BUTTON]) || 1; // default to left (left as per vendors, not W3C which is 0)
324
329
    },
760
765
});
761
766
 
762
767
 
763
 
}, '3.2.0' ,{requires:['node-base','event-touch','event-synthetic']});
764
 
 
765
 
 
766
 
YUI.add('event-gestures', function(Y){}, '3.2.0' ,{use:['event-flick', 'event-move']});
 
768
}, '3.3.0' ,{requires:['node-base','event-touch','event-synthetic']});
 
769
 
 
770
 
 
771
YUI.add('event-gestures', function(Y){}, '3.3.0' ,{use:['event-flick', 'event-move']});
767
772