summaryrefslogtreecommitdiff
path: root/frontend/gamma/js/MochiKit/DragAndDrop.js
Unidiff
Diffstat (limited to 'frontend/gamma/js/MochiKit/DragAndDrop.js') (more/less context) (ignore whitespace changes)
-rw-r--r--frontend/gamma/js/MochiKit/DragAndDrop.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/frontend/gamma/js/MochiKit/DragAndDrop.js b/frontend/gamma/js/MochiKit/DragAndDrop.js
index 62777c5..cf84f77 100644
--- a/frontend/gamma/js/MochiKit/DragAndDrop.js
+++ b/frontend/gamma/js/MochiKit/DragAndDrop.js
@@ -5,13 +5,13 @@ See <http://mochikit.com/> for documentation, downloads, license, etc.
5 5
6Copyright (c) 2005 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us) 6Copyright (c) 2005 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
7 Mochi-ized By Thomas Herve (_firstname_@nimail.org) 7 Mochi-ized By Thomas Herve (_firstname_@nimail.org)
8 8
9***/ 9***/
10 10
11MochiKit.Base._module('DragAndDrop', '1.5', ['Base', 'Iter', 'DOM', 'Signal', 'Visual', 'Position']); 11MochiKit.Base.module(MochiKit, 'DragAndDrop', '1.5', ['Base', 'Iter', 'DOM', 'Signal', 'Visual', 'Position']);
12 12
13MochiKit.DragAndDrop.Droppables = { 13MochiKit.DragAndDrop.Droppables = {
14 /*** 14 /***
15 15
16 Manage all droppables. Shouldn't be used, use the Droppable object instead. 16 Manage all droppables. Shouldn't be used, use the Droppable object instead.
17 17
@@ -303,14 +303,15 @@ MochiKit.DragAndDrop.Draggables = {
303 if (!this.activeDraggable) { 303 if (!this.activeDraggable) {
304 return; 304 return;
305 } 305 }
306 var pointer = event.mouse(); 306 var pointer = event.mouse();
307 // Mozilla-based browsers fire successive mousemove events with 307 // Mozilla-based browsers fire successive mousemove events with
308 // the same coordinates, prevent needless redrawing (moz bug?) 308 // the same coordinates, prevent needless redrawing (moz bug?)
309 if (this._lastPointer && (MochiKit.Base.repr(this._lastPointer.page) == 309 if (this._lastPointer &&
310 MochiKit.Base.repr(pointer.page))) { 310 this._lastPointer.page.x == pointer.page.x &&
311 this._lastPointer.page.y == pointer.page.y) {
311 return; 312 return;
312 } 313 }
313 this._lastPointer = pointer; 314 this._lastPointer = pointer;
314 this.activeDraggable.updateDrag(event, pointer); 315 this.activeDraggable.updateDrag(event, pointer);
315 }, 316 },
316 317
@@ -439,14 +440,14 @@ MochiKit.DragAndDrop.Draggable.prototype = {
439 }, 440 },
440 441
441 /** @id MochiKit.DragAndDrop.currentDelta */ 442 /** @id MochiKit.DragAndDrop.currentDelta */
442 currentDelta: function () { 443 currentDelta: function () {
443 var s = MochiKit.Style.getStyle; 444 var s = MochiKit.Style.getStyle;
444 return [ 445 return [
445 parseInt(s(this.element, 'left') || '0'), 446 parseInt(s(this.element, 'left') || '0', 10),
446 parseInt(s(this.element, 'top') || '0')]; 447 parseInt(s(this.element, 'top') || '0', 10)];
447 }, 448 },
448 449
449 /** @id MochiKit.DragAndDrop.initDrag */ 450 /** @id MochiKit.DragAndDrop.initDrag */
450 initDrag: function (event) { 451 initDrag: function (event) {
451 if (!event.mouse().button.left) { 452 if (!event.mouse().button.left) {
452 return; 453 return;
@@ -478,14 +479,13 @@ MochiKit.DragAndDrop.Draggable.prototype = {
478 this.dragging = true; 479 this.dragging = true;
479 if (this.options.selectclass) { 480 if (this.options.selectclass) {
480 MochiKit.DOM.addElementClass(this.element, 481 MochiKit.DOM.addElementClass(this.element,
481 this.options.selectclass); 482 this.options.selectclass);
482 } 483 }
483 if (this.options.zindex) { 484 if (this.options.zindex) {
484 this.originalZ = parseInt(MochiKit.Style.getStyle(this.element, 485 this.originalZ = MochiKit.Style.getStyle(this.element, 'z-index');
485 'z-index') || '0');
486 this.element.style.zIndex = this.options.zindex; 486 this.element.style.zIndex = this.options.zindex;
487 } 487 }
488 488
489 if (this.options.ghosting) { 489 if (this.options.ghosting) {
490 this._clone = this.element.cloneNode(true); 490 this._clone = this.element.cloneNode(true);
491 this.ghostPosition = MochiKit.Position.absolutize(this.element); 491 this.ghostPosition = MochiKit.Position.absolutize(this.element);