2
2
Copyright (c) 2008, Yahoo! Inc. All rights reserved.
3
3
Code licensed under the BSD License:
4
4
http://developer.yahoo.net/yui/license.txt
7
7
YUI.add('dd-ddm-drop', function(Y) {
266
266
_deactivateTargets: function() {
268
activeDrag = this.activeDrag;
268
activeDrag = this.activeDrag,
269
activeDrop = this.activeDrop;
270
271
//TODO why is this check so hard??
271
if (activeDrag && !Y.Lang.isNull(this.activeDrop) && this.otherDrops[this.activeDrop]) {
272
if (activeDrag && activeDrop && this.otherDrops[activeDrop]) {
272
273
if (!activeDrag.get('dragMode')) {
273
274
//TODO otherDrops -- private..
274
275
other = this.otherDrops;
275
delete other[this.activeDrop];
276
delete other[activeDrop];
277
278
var tmp = this.getBestMatch(this.otherDrops, true);
278
this.activeDrop = tmp[0];
281
282
activeDrag.get('node').removeClass(this.CSS_PREFIX + '-drag-over')
282
this.activeDrop.fire('drop:hit', { drag: activeDrag, drop: this.activeDrop, others: other });
283
activeDrag.fire('drag:drophit', { drag: activeDrag, drop: this.activeDrop, others: other });
284
} else if (this.activeDrag) {
284
activeDrop.fire('drop:hit', { drag: activeDrag, drop: activeDrop, others: other });
285
activeDrag.fire('drag:drophit', { drag: activeDrag, drop: activeDrop, others: other });
287
} else if (activeDrag) {
285
288
activeDrag.get('node').removeClass(this.CSS_PREFIX + '-drag-over')
286
289
activeDrag.fire('drag:dropmiss', { pageX: activeDrag.lastXY[0], pageY: activeDrag.lastXY[1] });
399
}, '3.0.0pr1' ,{requires:['dd-ddm'], skinnable:false});
402
}, '3.0.0pr2' ,{requires:['dd-ddm'], skinnable:false});