~ahasenack/lazr-js/lazr-js-11.03-packaging

« back to all changes in this revision

Viewing changes to src-js/lazrjs/yui/dd/dd-ddm.js

  • Committer: Sidnei da Silva
  • Date: 2010-04-08 14:44:59 UTC
  • mfrom: (166.8.13 yui-3.1.0)
  • Revision ID: sidnei.da.silva@canonical.com-20100408144459-qozybvnrgr7iee7k
Merged yui-3.1.0 [r=therve,rockstar] [f=558457].

Updates lazr-js to use YUI 3.1.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
Copyright (c) 2009, Yahoo! Inc. All rights reserved.
 
2
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
3
3
Code licensed under the BSD License:
4
 
http://developer.yahoo.net/yui/license.txt
5
 
version: 3.0.0
6
 
build: 1549
 
4
http://developer.yahoo.com/yui/license.html
 
5
version: 3.1.0
 
6
build: 2026
7
7
*/
8
8
YUI.add('dd-ddm', function(Y) {
9
9
 
31
31
        * @type {Boolean}
32
32
        */
33
33
        _debugShim: false,
34
 
        _activateTargets: function() {},
 
34
        _activateTargets: function() { },
35
35
        _deactivateTargets: function() {},
36
36
        _startDrag: function() {
37
37
            if (this.activeDrag.get('useShim')) {
81
81
        */
82
82
        _pg_size: function() {
83
83
            if (this.activeDrag) {
84
 
                var b = Y.get('body'),
 
84
                var b = Y.one('body'),
85
85
                h = b.get('docHeight'),
86
86
                w = b.get('docWidth');
87
87
                this._pg.setStyles({
97
97
        */
98
98
        _createPG: function() {
99
99
            var pg = Y.Node.create('<div></div>'),
100
 
            bd = Y.get('body');
 
100
            bd = Y.one('body'), win;
101
101
            pg.setStyles({
102
102
                top: '0',
103
103
                left: '0',
110
110
                width: '5px'
111
111
            });
112
112
            pg.set('id', Y.stamp(pg));
113
 
            pg.addClass('yui-dd-shim');
 
113
            pg.addClass('yui3-dd-shim');
114
114
            if (bd.get('firstChild')) {
115
115
                bd.insertBefore(pg, bd.get('firstChild'));
116
116
            } else {
118
118
            }
119
119
            this._pg = pg;
120
120
            this._pg.on('mouseup', Y.bind(this._end, this));
121
 
            this._pg.on('mousemove', Y.bind(this._move, this));
 
121
            this._pg.on('mousemove', Y.throttle(Y.bind(this._move, this), this.get('throttleTime')));
122
122
            
123
 
            var win = Y.get(window);
 
123
            win = Y.one(window);
124
124
            Y.on('window:resize', Y.bind(this._pg_size, this));
125
125
            win.on('scroll', Y.bind(this._pg_size, this));
126
126
        }   
127
127
    }, true);
128
128
 
129
 
    Y.on('domready', Y.bind(Y.DD.DDM._createPG, Y.DD.DDM));
130
 
 
131
 
 
132
 
 
133
 
 
134
 
 
135
 
}, '3.0.0' ,{requires:['dd-ddm-base', 'event-resize'], skinnable:false});
 
129
 
 
130
 
 
131
 
 
132
}, '3.1.0' ,{requires:['dd-ddm-base', 'event-resize'], skinnable:false});