Class Index | File Index

Classes


Class Alfresco.util.DraggableProxy

Extends YAHOO.util.DDProxy
Defined in: alfresco-dnd.js
Constructor Summary
Constructor Attributes Constructor Name and Description
 
Alfresco.util.DraggableProxy(li, shadow, dndComponent)
Alfresco.util.DraggableProxy constructor.
Method Summary
Method Attributes Method Name and Description
 
endDrag(e, id)
Callback for when the drag n drop session is over, is called even if
 
insertSrcEl(srcEl)
Checks what was dragged and to where, so it knows if to add or move the draggable.
 
onDrag(event)
Callback that gets called repeatedly when the proxy is dragged.
 
onDragDrop(event, id)
Callback that gets called when a element was dropped over a target.
 
onDragOut(event, id)
Callback that gets called when the proxy is dragged out from a drop target.
 
onDragOver(event, id)
Callback that gets called when the proxy is over a drop target.
 
Called when drop is done outside a target, will make sure the original drag source
 
startDrag(x, y)
Callback for when the user drags the draggable.
Constructor Detail
Alfresco.util.DraggableProxy(li, shadow, dndComponent)
Alfresco.util.DraggableProxy constructor.

Alfresco.util.DraggableProxy is a class that represents the actual dragged element.
It extends the yui class YAHOO.util.DDProxy that gives access to most of
the needed properties during a drag n drop operation.
Parameters:
{HTMLElement} li
of type li, a shared "invisible" draggable that creates "space" in the list during drag n drop.
shadow
{Alfresco.util.DragAndDrop} the component (for helper functions and the current context such as selected draggable etc)
{string} dndComponent
the component (for helper functions and the current context such as selected draggable etc)
Returns:
{Alfresco.util.DraggableProxy} The new DraggableProxy instance
Method Detail
endDrag(e, id)
Callback for when the drag n drop session is over, is called even if
the proxy wasn't dropped on a target.

Will either delete, add or leave the draggable depending on where the
draggable was dropped.
Parameters:
{int} e
{string} id

insertSrcEl(srcEl)
Checks what was dragged and to where, so it knows if to add or move the draggable.
Parameters:
{HTMLElement} srcEl

onDrag(event)
Callback that gets called repeatedly when the proxy is dragged.
Keeps track of the direction the user is drawing the mouse so we on
the dragOver can decide if the shadow element should be placed above
or over other draggables.
Parameters:
{HTMLElement} event

onDragDrop(event, id)
Callback that gets called when a element was dropped over a target.
Parameters:
{HTMLElement} event
{string} id
The id of the target element the proxy was dropped over.

onDragOut(event, id)
Callback that gets called when the proxy is dragged out from a drop target.
Parameters:
{HTMLElement} event
{string} id
The id of the target element the proxy was dragged out of

onDragOver(event, id)
Callback that gets called when the proxy is over a drop target.
Places out the "invisible" shadow element to make space for the new
draggable in the column.
Parameters:
{HTMLElement} event
{string} id
The id of the target element the proxy was dragged over.

onInvalidDrop()
Called when drop is done outside a target, will make sure the original drag source
is visible if user scrolled out of screen.

startDrag(x, y)
Callback for when the user drags the draggable.
Will style the proxy to match the draggable.
Parameters:
{int} x
the x position of where the drag started
{int} y
the y position of where the drag started

Documentation generated by JsDoc Toolkit 2.4.0 on Thu Feb 16 2012 12:24:28 GMT-0000 (GMT)