~ubuntu-branches/ubuntu/raring/maas/raring-updates

« back to all changes in this revision

Viewing changes to src/maasserver/static/jslibs/yui/3.4.1/build/event-touch/event-touch-debug.js

  • Committer: Package Import Robot
  • Author(s): Andres Rodriguez
  • Date: 2012-07-03 17:42:37 UTC
  • mfrom: (1.1.13)
  • Revision ID: package-import@ubuntu.com-20120703174237-p8l0keuuznfg721k
Tags: 0.1+bzr709+dfsg-0ubuntu1
* New Upstream release
* debian/control:
  - Depends on python-celery, python-tempita, libjs-yui3-{full,min},
    libjs-raphael
* debian/maas.install:
  - Install apiclient, celeryconfig.py, maas-import-pxe-files, preseeds_v2.
  - Update to install various files from chroot, rather tha manually copy
    them from the source.
* debian/maas.links: symlink celeryconfig.py
* debian/maas.maas-celery.upstart: Add job.
* debian/rules:
  - Install celery upstart job.
  - Do not install jslibs as packages are now used.
  - Drop copying of maas_local_settings_sample.py as source now ships
    a maas_local_settings.py
* debian/patches:
  - 04-maas-http-fix.patch: Drop. Merged upstream.
  - 01-fix-database-settings.patch: Refreshed.
  - 99_enums_js.patch: Added until creation of enum.js / build process
    is fixed.
* debian/maas.postinst: Update bzr version to correctly handle upgrades.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
YUI 3.4.1 (build 4118)
3
 
Copyright 2011 Yahoo! Inc. All rights reserved.
4
 
Licensed under the BSD License.
5
 
http://yuilibrary.com/license/
6
 
*/
7
 
YUI.add('event-touch', function(Y) {
8
 
 
9
 
/**
10
 
 * Adds touch event facade normalization properties (touches, changedTouches, targetTouches etc.) to the DOM event facade
11
 
 *
12
 
 * @module event-touch
13
 
 */
14
 
 
15
 
var SCALE = "scale",
16
 
    ROTATION = "rotation",
17
 
    IDENTIFIER = "identifier";
18
 
 
19
 
/**
20
 
 * Adds touch event facade normalization properties to the DOM event facade
21
 
 *
22
 
 * @method _touch
23
 
 * @for DOMEventFacade
24
 
 * @private
25
 
 * @param ev {Event} the DOM event
26
 
 * @param currentTarget {HTMLElement} the element the listener was attached to
27
 
 * @param wrapper {Event.Custom} the custom event wrapper for this DOM event
28
 
 */
29
 
Y.DOMEventFacade.prototype._touch = function(e, currentTarget, wrapper) {
30
 
 
31
 
    var i,l, etCached, et,touchCache;
32
 
 
33
 
    Y.log("Calling facade._touch() with e = " + e);
34
 
 
35
 
    if (e.touches) {
36
 
        Y.log("Found e.touches. Replicating on facade");
37
 
 
38
 
        /**
39
 
         * Array of individual touch events for touch points that are still in
40
 
         * contact with the touch surface.
41
 
         *
42
 
         * @property touches
43
 
         * @type {DOMEventFacade[]}
44
 
         */
45
 
        this.touches = [];
46
 
        touchCache = {};
47
 
 
48
 
        for (i = 0, l = e.touches.length; i < l; ++i) {
49
 
            et = e.touches[i];
50
 
            touchCache[Y.stamp(et)] = this.touches[i] = new Y.DOMEventFacade(et, currentTarget, wrapper);
51
 
        }
52
 
    }
53
 
 
54
 
    if (e.targetTouches) {
55
 
        Y.log("Found e.targetTouches. Replicating on facade");
56
 
 
57
 
        /**
58
 
         * Array of individual touch events still in contact with the touch
59
 
         * surface and whose `touchstart` event occurred inside the same taregt
60
 
         * element as the current target element.
61
 
         *
62
 
         * @property targetTouches
63
 
         * @type {DOMEventFacade[]}
64
 
         */
65
 
        this.targetTouches = [];
66
 
 
67
 
        for (i = 0, l = e.targetTouches.length; i < l; ++i) {
68
 
            et = e.targetTouches[i];
69
 
            etCached = touchCache && touchCache[Y.stamp(et, true)];
70
 
 
71
 
            this.targetTouches[i] = etCached || new Y.DOMEventFacade(et, currentTarget, wrapper);
72
 
            
73
 
            if (etCached) { Y.log("Found native event in touches. Using same facade in targetTouches"); }
74
 
        }
75
 
    }
76
 
 
77
 
    if (e.changedTouches) {
78
 
        Y.log("Found e.changedTouches. Replicating on facade");        
79
 
 
80
 
        /**
81
 
        An array of event-specific touch events.
82
 
 
83
 
        For `touchstart`, the touch points that became active with the current
84
 
        event.
85
 
 
86
 
        For `touchmove`, the touch points that have changed since the last
87
 
        event.
88
 
        
89
 
        For `touchend`, the touch points that have been removed from the touch
90
 
        surface.
91
 
 
92
 
        @property changedTouches
93
 
        @type {DOMEventFacade[]}
94
 
        **/
95
 
        this.changedTouches = [];
96
 
 
97
 
        for (i = 0, l = e.changedTouches.length; i < l; ++i) {
98
 
            et = e.changedTouches[i];
99
 
            etCached = touchCache && touchCache[Y.stamp(et, true)];
100
 
 
101
 
            this.changedTouches[i] = etCached || new Y.DOMEventFacade(et, currentTarget, wrapper);
102
 
            
103
 
            if (etCached) { Y.log("Found native event in touches. Using same facade in changedTouches"); }
104
 
        }
105
 
    }
106
 
 
107
 
    if (SCALE in e) {
108
 
        this[SCALE] = e[SCALE];
109
 
    }
110
 
 
111
 
    if (ROTATION in e) {
112
 
        this[ROTATION] = e[ROTATION];
113
 
    }
114
 
 
115
 
    if (IDENTIFIER in e) {
116
 
        this[IDENTIFIER] = e[IDENTIFIER];
117
 
    }
118
 
};
119
 
 
120
 
if (Y.Node.DOM_EVENTS) {
121
 
    Y.mix(Y.Node.DOM_EVENTS, {
122
 
        touchstart:1,
123
 
        touchmove:1,
124
 
        touchend:1,
125
 
        touchcancel:1,
126
 
        gesturestart:1,
127
 
        gesturechange:1,
128
 
        gestureend:1
129
 
    });
130
 
}
131
 
 
132
 
 
133
 
}, '3.4.1' ,{requires:['node-base']});