Changeset 520
- Timestamp:
- 01/18/06 13:37:47 (3 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
mochikit/branches/scriptaculous/MochiKit/DragAndDrop.js
r519 r520 1 1 /*** 2 MochiKit. Effect1.22 MochiKit.DragAndDrop 1.2 3 3 4 4 See <http://mochikit.com/> for documentation, downloads, license, etc. … … 8 8 9 9 ***/ 10 11 if (typeof(dojo) != 'undefined') { 12 dojo.provide('MochiKit.DragAndDrop'); 13 dojo.require('MochiKit.Base'); 14 dojo.require('MochiKit.DOM'); 15 dojo.require('MochiKit.Effect'); 16 dojo.require('MochiKit.Iter'); 17 } 18 19 if (typeof(JSAN) != 'undefined') { 20 JSAN.use("MochiKit.Base", []); 21 JSAN.use("MochiKit.DOM", []); 22 JSAN.use("MochiKit.Effect", []); 23 JSAN.use("MochiKit.Iter", []); 24 } 25 26 try { 27 if (typeof(MochiKit.Base) == 'undefined' || 28 typeof(MochiKit.DOM) == 'undefined' || 29 typeof(MochiKit.Effect) == 'undefined' || 30 typeof(MochiKit.Iter) == 'undefined') { 31 throw ""; 32 } 33 } catch (e) { 34 throw "MochiKit.DragAndDrop depends on MochiKit.Base, MochiKit.DOM, MochiKit.Effect and MochiKit.Iter!"; 35 } 10 36 11 37 if (typeof(MochiKit.DragAndDrop) == 'undefined') { … … 23 49 return this.__repr__(); 24 50 }; 51 52 MochiKit.DragAndDrop.EXPORT = [ 53 "Droppable", 54 "Draggable" 55 ]; 56 57 MochiKit.DragAndDrop.EXPORT_OK = [ 58 "Droppables", 59 "Draggables" 60 ]; 25 61 26 62 MochiKit.DragAndDrop.Droppables = { … … 332 368 handle: false, 333 369 starteffect: function (element) { 334 new Effect.Opacity(element,370 new MochiKit.Effect.Opacity(element, 335 371 {duration:0.2, from:1.0, to:0.7}); 336 372 }, … … 338 374 var dur = Math.sqrt(Math.abs(top_offset^2) + 339 375 Math.abs(left_offset^2))*0.02; 340 element._revert = new Effect.Move(element,376 element._revert = new MochiKit.Effect.Move(element, 341 377 {x: -left_offset, y: -top_offset, duration: dur}); 342 378 }, 343 379 endeffect: function (element) { 344 new Effect.Opacity(element, {duration:0.2, from:0.7, to:1.0});380 new MochiKit.Effect.Opacity(element, {duration:0.2, from:0.7, to:1.0}); 345 381 }, 346 382 zindex: 1000, … … 469 505 if (this.options.ghosting) { 470 506 // XXX: from a user point of view, it would be better to remove 471 // the node only *after* the Effect.Move end507 // the node only *after* the MochiKit.Effect.Move end 472 508 MochiKit.Position.relativize(this.element); 473 509 MochiKit.DOM.removeElement(this._clone); … … 567 603 }; 568 604 605 MochiKit.DragAndDrop.__new__ = function () { 606 MochiKit.Base.nameFunctions(this); 607 608 this.EXPORT_TAGS = { 609 ":common": this.EXPORT, 610 ":all": MochiKit.Base.concat(this.EXPORT, this.EXPORT_OK) 611 }; 612 }; 613 614 MochiKit.DragAndDrop.__new__(); 615 616 MochiKit.Base._exportSymbols(this, MochiKit.DragAndDrop); 617 mochikit/branches/scriptaculous/MochiKit/Effects.js
r519 r520 54 54 return this.__repr__(); 55 55 }; 56 57 MochiKit.Effect.EXPORT = [ 58 "tagifyText", 59 "multiple", 60 "toggle", 61 "Base", 62 "Parallel", 63 "Opacity", 64 "Move", 65 "Scale", 66 "Highlight", 67 "ScrollTo", 68 "Fade", 69 "Appear", 70 "Puff", 71 "BlindUp", 72 "BlindDown", 73 "SwitchOff", 74 "DropOut", 75 "Shake", 76 "SlideDown", 77 "SlideUp", 78 "Squish", 79 "Grow", 80 "Shrink", 81 "Pulsate", 82 "Fold" 83 ]; 84 85 MochiKit.Effect.EXPORT_OK = [ 86 "PAIRS" 87 ]; 56 88 57 89 MochiKit.Effect.tagifyText = function (element, /* optional */tagifyStyle) { … … 219 251 220 252 remove: function (effect) { 221 this.effects = MochiKit. Iter.filter(function (e) {253 this.effects = MochiKit.Base.filter(function (e) { 222 254 return e != effect; 223 255 }, this.effects); … … 1277 1309 }; 1278 1310 1311 MochiKit.Effect.__new__ = function () { 1312 MochiKit.Base.nameFunctions(this); 1313 1314 this.EXPORT_TAGS = { 1315 ":common": this.EXPORT, 1316 ":all": MochiKit.Base.concat(this.EXPORT, this.EXPORT_OK) 1317 }; 1318 }; 1319 1320 MochiKit.Effect.__new__(); 1321 1322 MochiKit.Base._exportSymbols(this, MochiKit.Effect); 1323
