dd-plugin.js revision 063bc75c8da327a18bc88759919aac5a9466881c
157N/A * Simple Drag plugin that can be attached to a Node or Widget via the plug method. 157N/A * Simple Drag plugin that can be attached to a Node or Widget via the plug method. 157N/A * @description The Drag instance will be placed on the Node instance under the dd namespace. It can be accessed via Node.dd; 1413N/A * refers to a Y.Widget if its the host, otherwise = false. * refers to the [x,y] coordinate where the drag was stopped last * @attribute _stoppedPosition * Returns true if widget uses widgetPosition, otherwise returns false * @method _usesWidgetPosition * Sets up event listeners on drag events if interacting with a widget //if this thing is a widget, and it uses widgetposition... //set the x,y on the widget's ATTRS //store the new position that the widget ends up on * Updates x,y or xy attributes on widget based on where the widget is dragged * @param {EventFacade} e Event Facade //get the last position where the widget was, or get the starting point //amount moved = [(x2 - x1) , (y2 - y1)] //if only x is 0, set the Y //otherwise, y is 0, so set X * Updates the last position where the widget was stopped. * @method updateStopPosition * @param {EventFacade} e Event Facade