~michael.nelson/ubuntu-webcatalog/1267731-import-sca-apps-error

« back to all changes in this revision

Viewing changes to src/webcatalog/static/yui/3.10.3/build/event-mousewheel/event-mousewheel-debug.js

  • Committer: Tarmac
  • Author(s): Stephen Stewart
  • Date: 2013-06-26 09:19:32 UTC
  • mfrom: (184.1.4 ubuntu-global-nav)
  • Revision ID: tarmac-20130626091932-8urtuli368k8p7ds
[r=beuno,jonas-drange] add ubuntu global nav to apps.ubuntu.com

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
YUI 3.10.3 (build 2fb5187)
 
3
Copyright 2013 Yahoo! Inc. All rights reserved.
 
4
Licensed under the BSD License.
 
5
http://yuilibrary.com/license/
 
6
*/
 
7
 
 
8
YUI.add('event-mousewheel', function (Y, NAME) {
 
9
 
 
10
/**
 
11
 * Adds mousewheel event support
 
12
 * @module event
 
13
 * @submodule event-mousewheel
 
14
 */
 
15
var DOM_MOUSE_SCROLL = 'DOMMouseScroll',
 
16
    fixArgs = function(args) {
 
17
        var a = Y.Array(args, 0, true), target;
 
18
        if (Y.UA.gecko) {
 
19
            a[0] = DOM_MOUSE_SCROLL;
 
20
            target = Y.config.win;
 
21
        } else {
 
22
            target = Y.config.doc;
 
23
        }
 
24
 
 
25
        if (a.length < 3) {
 
26
            a[2] = target;
 
27
        } else {
 
28
            a.splice(2, 0, target);
 
29
        }
 
30
 
 
31
        return a;
 
32
    };
 
33
 
 
34
/**
 
35
 * Mousewheel event.  This listener is automatically attached to the
 
36
 * correct target, so one should not be supplied.  Mouse wheel
 
37
 * direction and velocity is stored in the 'wheelDelta' field.
 
38
 * @event mousewheel
 
39
 * @param type {string} 'mousewheel'
 
40
 * @param fn {function} the callback to execute
 
41
 * @param context optional context object
 
42
 * @param args 0..n additional arguments to provide to the listener.
 
43
 * @return {EventHandle} the detach handle
 
44
 * @for YUI
 
45
 */
 
46
Y.Env.evt.plugins.mousewheel = {
 
47
    on: function() {
 
48
        return Y.Event._attach(fixArgs(arguments));
 
49
    },
 
50
 
 
51
    detach: function() {
 
52
        return Y.Event.detach.apply(Y.Event, fixArgs(arguments));
 
53
    }
 
54
};
 
55
 
 
56
 
 
57
}, '3.10.3', {"requires": ["node-base"]});