Overview | IndexGodLikeMouse JavaScript Framework
FRAMES | NO FRAMES

GLM.DOM.DragAndDrop.setAbsolute( abs )

GLM.DOM.DragAndDrop.setAbsolute( abs )

Method for setting whether or not to use absolute positioning when dragging.

Parameters:

abs - true to use abosolute positioning, false to use top left cursor positioning (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.setAbsolute(true); //use absolute positioning



Overview | IndexGodLikeMouse JavaScript Framework
FRAMES | NO FRAMES