* Fired on mousemove.
*
* 'DragDrop2:end'
+ * Fired on mouseup.
+ *
+ * 'DragDrop2:mousedown'
* Fired on mousedown.
*
* 'DragDrop2:start'
- * Fired on mouseup.
+ * Fired when first moved more than 'threshold'.
*
*
* new Drop(element, {
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);
+ this.element.fire('DragDrop2:mousedown', e);
if (this.options.ghosting || this.options.caption) {
if (!DragDrop.Drags.cover) {
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() ];
return cnt + ' ' + (cnt == 1 ? DIMP.text.message : DIMP.text.messages);
},
- onDragStart: function(e)
+ onDragMouseDown: function(e)
{
var args,
elt = e.element(),
document.observe('DragDrop2:drag', DimpBase.onDrag.bindAsEventListener(DimpBase));
document.observe('DragDrop2:drop', DimpBase.folderDropHandler.bindAsEventListener(DimpBase));
document.observe('DragDrop2:end', DimpBase.onDragEnd.bindAsEventListener(DimpBase));
-document.observe('DragDrop2:start', DimpBase.onDragStart.bindAsEventListener(DimpBase));
+document.observe('DragDrop2:mousedown', DimpBase.onDragMouseDown.bindAsEventListener(DimpBase));
/* Route AJAX responses through ViewPort. */
DimpCore.onDoActionComplete = function(r) {