Diffstat (limited to 'frontend/gamma/js/MochiKit/DragAndDrop.js') (more/less context) (ignore whitespace changes)
-rw-r--r-- | frontend/gamma/js/MochiKit/DragAndDrop.js | 14 |
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 | |||
@@ -7,9 +7,9 @@ Copyright (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 | ||
11 | MochiKit.Base._module('DragAndDrop', '1.5', ['Base', 'Iter', 'DOM', 'Signal', 'Visual', 'Position']); | 11 | MochiKit.Base.module(MochiKit, 'DragAndDrop', '1.5', ['Base', 'Iter', 'DOM', 'Signal', 'Visual', 'Position']); |
12 | 12 | ||
13 | MochiKit.DragAndDrop.Droppables = { | 13 | MochiKit.DragAndDrop.Droppables = { |
14 | /*** | 14 | /*** |
15 | 15 | ||
@@ -305,10 +305,11 @@ MochiKit.DragAndDrop.Draggables = { | |||
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); |
@@ -441,10 +442,10 @@ MochiKit.DragAndDrop.Draggable.prototype = { | |||
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) { |
@@ -480,10 +481,9 @@ MochiKit.DragAndDrop.Draggable.prototype = { | |||
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) { |