summaryrefslogtreecommitdiff
path: root/frontend/gamma/js/MochiKit/DragAndDrop.js
Side-by-side diff
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
@@ -7,9 +7,9 @@ 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 = {
/***
@@ -305,10 +305,11 @@ MochiKit.DragAndDrop.Draggables = {
}
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);
@@ -441,10 +442,10 @@ 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) {
@@ -480,10 +481,9 @@ MochiKit.DragAndDrop.Draggable.prototype = {
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) {