~ted/lazr-js/annoying-debug-message

« back to all changes in this revision

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

  • Committer: Launchpad Patch Queue Manager
  • Date: 2010-09-09 14:20:30 UTC
  • mfrom: (182.1.3 yui-3.2)
  • Revision ID: launchpad@pqm.canonical.com-20100909142030-13w6vo0ixfysxc15
[r=beuno] Update lazr-js to yui-3.2

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.1.2
6
 
build: 56
 
5
version: 3.2.0
 
6
build: 2676
7
7
*/
8
8
YUI.add('dd-proxy', function(Y) {
9
9
 
84
84
        borderStyle: {
85
85
            value: '1px solid #808080'
86
86
        },
 
87
        /**
 
88
        * @attribute cloneNode
 
89
        * @description Should the node be cloned into the proxy for you. Default: false
 
90
        * @type Boolean
 
91
        */
87
92
        cloneNode: {
88
93
            value: false
89
94
        }
154
159
            var host = this.get(HOST),
155
160
                n = host.get(NODE),
156
161
                c = n.cloneNode(true);
157
 
            c.set('id', '');
 
162
 
 
163
            delete c._yuid;
 
164
            c.setAttribute('id', Y.guid());
158
165
            c.setStyle('position', 'absolute');
159
 
            delete c._yuid;
160
 
            Y.stamp(c);
161
166
            n.get('parentNode').appendChild(c);
162
167
            host.set(DRAG_NODE, c);
163
168
            return c;
192
197
                    left: '-999px'
193
198
                });
194
199
 
195
 
                b.insertBefore(p, b.get('firstChild'));
196
 
                p.set('id', Y.stamp(p));
 
200
                b.prepend(p);
 
201
                p.set('id', Y.guid());
197
202
                p.addClass(DDM.CSS_PREFIX + '-proxy');
198
203
                DDM._proxy = p;
199
204
            }
208
213
        */
209
214
        _setFrame: function(drag) {
210
215
            var n = drag.get(NODE), d = drag.get(DRAG_NODE), ah, cur = 'auto';
211
 
            if (drag.proxy.get('resizeFrame')) {
212
 
                DDM._proxy.setStyles({
213
 
                    height: n.get('offsetHeight') + 'px',
214
 
                    width: n.get('offsetWidth') + 'px'
215
 
                });
216
 
            }
217
216
            
218
217
            ah = DDM.activeDrag.get('activeHandle');
219
218
            if (ah) {
234
233
                d = drag.proxy.clone();
235
234
            }
236
235
 
 
236
            if (drag.proxy.get('resizeFrame')) {
 
237
                d.setStyles({
 
238
                    height: n.get('offsetHeight') + 'px',
 
239
                    width: n.get('offsetWidth') + 'px'
 
240
                });
 
241
            }
 
242
 
237
243
            if (drag.proxy.get('positionProxy')) {
238
244
                d.setXY(drag.nodeXY);
239
245
            }
246
252
 
247
253
 
248
254
 
249
 
}, '3.1.2' ,{requires:['dd-ddm', 'dd-drag'], skinnable:false});
 
255
}, '3.2.0' ,{skinnable:false, requires:['dd-ddm', 'dd-drag']});