src/drag.js
function(focusWindow, fromPoint, toPoint, duration, callback){
		this.currentDataTransferItem = null;
		this.focusWindow = focusWindow;
	
		// A series of events to simulate a drag operation
		this._mouseOver(fromPoint);
		this._mouseEnter(fromPoint);
		this._mouseMove(fromPoint);
		this._mouseDown(fromPoint);
		this._dragStart(fromPoint);
		this._drag(fromPoint);
		this._dragEnter(fromPoint);
		this._dragOver(fromPoint);
		
		
		
		
		DragonDrop.startMove(fromPoint, toPoint, duration, function () {
			
			// this happens later
			DragonDrop._dragLeave(fromPoint);
			DragonDrop._dragEnd(fromPoint);
			DragonDrop._mouseOut(fromPoint);
			DragonDrop._mouseLeave(fromPoint);
			
			DragonDrop._drop(toPoint);
			DragonDrop._dragEnd(toPoint);
			DragonDrop._mouseOver(toPoint);
			DragonDrop._mouseEnter(toPoint);
			
			// these are the "user" moving the mouse away after the drop
			DragonDrop._mouseMove(toPoint);
			DragonDrop._mouseOut(toPoint);
			DragonDrop._mouseLeave(toPoint);

			
			callback();
			DragonDrop.cleanup();
		});
	}
function(focusWindow, fromPoint, toPoint, duration, callback){
		this.currentDataTransferItem = null;
		this.focusWindow = focusWindow;
	
		// A series of events to simulate a drag operation
		this._mouseOver(fromPoint);
		this._mouseEnter(fromPoint);
		this._mouseMove(fromPoint);
		this._mouseDown(fromPoint);
		this._dragStart(fromPoint);
		this._drag(fromPoint);
		this._dragEnter(fromPoint);
		this._dragOver(fromPoint);
		
		
		
		
		DragonDrop.startMove(fromPoint, toPoint, duration, function () {
			
			// this happens later
			DragonDrop._dragLeave(fromPoint);
			DragonDrop._dragEnd(fromPoint);
			DragonDrop._mouseOut(fromPoint);
			DragonDrop._mouseLeave(fromPoint);
			
			DragonDrop._drop(toPoint);
			DragonDrop._dragEnd(toPoint);
			DragonDrop._mouseOver(toPoint);
			DragonDrop._mouseEnter(toPoint);
			
			// these are the "user" moving the mouse away after the drop
			DragonDrop._mouseMove(toPoint);
			DragonDrop._mouseOut(toPoint);
			DragonDrop._mouseLeave(toPoint);

			
			callback();
			DragonDrop.cleanup();
		});
	}
function ( focusWindow , fromPoint , toPoint , duration , callback ) { this . currentDataTransferItem = null ; this . focusWindow = focusWindow ; // A series of events to simulate a drag operation this . _mouseOver ( fromPoint ) ; this . _mouseEnter ( fromPoint ) ; this . _mouseMove ( fromPoint ) ; this . _mouseDown ( fromPoint ) ; this . _dragStart ( fromPoint ) ; this . _drag ( fromPoint ) ; this . _dragEnter ( fromPoint ) ; this . _dragOver ( fromPoint ) ; DragonDrop . startMove ( fromPoint , toPoint , duration , function ( ) { // this happens later DragonDrop . _dragLeave ( fromPoint ) ; DragonDrop . _dragEnd ( fromPoint ) ; DragonDrop . _mouseOut ( fromPoint ) ; DragonDrop . _mouseLeave ( fromPoint ) ; DragonDrop . _drop ( toPoint ) ; DragonDrop . _dragEnd ( toPoint ) ; DragonDrop . _mouseOver ( toPoint ) ; DragonDrop . _mouseEnter ( toPoint ) ; // these are the "user" moving the mouse away after the drop DragonDrop . _mouseMove ( toPoint ) ; DragonDrop . _mouseOut ( toPoint ) ; DragonDrop . _mouseLeave ( toPoint ) ; callback ( ) ; DragonDrop . cleanup ( ) ; } ) ; }
Performs a series of dragStart, dragEnter, dragOver and drop operations to simulate a dragDrop
@param fromElement: element from where drag is started
@param channel: destination element for drop
Performs a series of dragStart dragEnter dragOver and drop operations to simulate a dragDrop