Overview | IndexGodLikeMouse JavaScript Framework
FRAMES | NO FRAMES

GLM.DOM.DragAndDrop.setCopyElement( copy )

GLM.DOM.DragAndDrop.setCopyElement( copy )

Method for setting whether or not to copy the drag source element.

Parameters:

copy - true to create a copy of the drag source element, false to drag original (default false).

Example:

var dnd = new DragAndDrop();
function OnBeginDrag(source){
    alert("source element is: " + source.tagName);
}//end OnBeginDrag()

function OnDrag(source, dest){
    if(dest)
        alert("drop target: " + dest.tagName);
}//end OnDrag()

function OnDrop(source, dest){
    alert("source is: " + source.tagName);
    alert("dest is: " + dest.tagName);
}//end OnDrop()

dnd.setBeginDragCallback(OnBeginDrag);
dnd.setDragCallback(OnDrag);
dnd.setDropCallback(OnDrop);
dnd.setCopyElement(true); //a copy element will be used.



Overview | IndexGodLikeMouse JavaScript Framework
FRAMES | NO FRAMES