Revert "Fire DragDrop2:start only after moving the mouse more than the defined thresh...
authorMichael M Slusarz <slusarz@curecanti.org>
Tue, 16 Mar 2010 06:07:37 +0000 (00:07 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Tue, 16 Mar 2010 06:09:06 +0000 (00:09 -0600)
This reverts commit 45707c39dd99834e4a60872e26f61c2fdca8657f.

This breaks click selections (e.g. dimp message selection).

horde/js/dragdrop2.js

index f1c3736..7ea6f52 100644 (file)
  *   Fired on mousemove.
  *
  * 'DragDrop2:end'
- *   Fired on mouseup.
+ *   Fired on mousedown.
  *
  * 'DragDrop2:start'
- *   Fired when first moved more than 'threshold'.
+ *   Fired on mouseup.
  *
  *
  * new Drop(element, {
@@ -263,9 +263,9 @@ Drag = Class.create({
         DragDrop.Drags.activate(this);
         this.move = 0;
         this.wasDragged = false;
-        this.wasMoved = false;
         this.lastcaption = null;
-        this.clickEvent = e;
+
+        this.element.fire('DragDrop2:start', e);
 
         if (this.options.ghosting || this.options.caption) {
             if (!DragDrop.Drags.cover) {
@@ -305,9 +305,6 @@ Drag = Class.create({
 
         if (++this.move <= this.options.threshold) {
             return;
-        } else if (!this.wasMoved) {
-            this.element.fire('DragDrop2:start', this.clickEvent);
-            this.wasMoved = true;
         }
 
         this.lastCoord = xy = [ e.pointerX(), e.pointerY() ];