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 @@ -5,13 +5,13 @@ See <http://mochikit.com/> for documentation, downloads, license, etc. Copyright (c) 2005 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us) Mochi-ized By Thomas Herve (_firstname_@nimail.org) ***/ -MochiKit.Base._module('DragAndDrop', '1.5', ['Base', 'Iter', 'DOM', 'Signal', 'Visual', 'Position']); +MochiKit.Base.module(MochiKit, 'DragAndDrop', '1.5', ['Base', 'Iter', 'DOM', 'Signal', 'Visual', 'Position']); MochiKit.DragAndDrop.Droppables = { /*** Manage all droppables. Shouldn't be used, use the Droppable object instead. @@ -303,14 +303,15 @@ MochiKit.DragAndDrop.Draggables = { if (!this.activeDraggable) { return; } var pointer = event.mouse(); // Mozilla-based browsers fire successive mousemove events with // the same coordinates, prevent needless redrawing (moz bug?) - if (this._lastPointer && (MochiKit.Base.repr(this._lastPointer.page) == - MochiKit.Base.repr(pointer.page))) { + if (this._lastPointer && + this._lastPointer.page.x == pointer.page.x && + this._lastPointer.page.y == pointer.page.y) { return; } this._lastPointer = pointer; this.activeDraggable.updateDrag(event, pointer); }, @@ -439,14 +440,14 @@ MochiKit.DragAndDrop.Draggable.prototype = { }, /** @id MochiKit.DragAndDrop.currentDelta */ currentDelta: function () { var s = MochiKit.Style.getStyle; return [ - parseInt(s(this.element, 'left') || '0'), - parseInt(s(this.element, 'top') || '0')]; + parseInt(s(this.element, 'left') || '0', 10), + parseInt(s(this.element, 'top') || '0', 10)]; }, /** @id MochiKit.DragAndDrop.initDrag */ initDrag: function (event) { if (!event.mouse().button.left) { return; @@ -478,14 +479,13 @@ MochiKit.DragAndDrop.Draggable.prototype = { this.dragging = true; if (this.options.selectclass) { MochiKit.DOM.addElementClass(this.element, this.options.selectclass); } if (this.options.zindex) { - this.originalZ = parseInt(MochiKit.Style.getStyle(this.element, - 'z-index') || '0'); + this.originalZ = MochiKit.Style.getStyle(this.element, 'z-index'); this.element.style.zIndex = this.options.zindex; } if (this.options.ghosting) { this._clone = this.element.cloneNode(true); this.ghostPosition = MochiKit.Position.absolutize(this.element); |