SwafDrag.js File Reference


Functions

function SwafDrag ()
 Drag&Drop implementation.
function swaf_dragger_drag (e)
 helper function - registered as mousemove event handler
function swaf_dragger_startDrag (e)
 helper function - registered as mousedown event handler or rather called by pageMouseDown()
function swaf_dragger_endDrag (e)
 helper function - registered as mouseup event handler
function swaf_makedraggable ()
 helper function - initializes the swaf_dragger as soon as the document has been loaded
new SwafOnload (swaf_makedraggable)

Variables

var swaf_dragger = new SwafDrag()
 The current drag&drop handler (SwafDrag).

Function Documentation

function swaf_dragger_drag  ) 
 

helper function - registered as mousemove event handler

function swaf_dragger_endDrag  ) 
 

helper function - registered as mouseup event handler

function swaf_dragger_startDrag  ) 
 

helper function - registered as mousedown event handler or rather called by pageMouseDown()

function swaf_makedraggable  ) 
 

helper function - initializes the swaf_dragger as soon as the document has been loaded

function SwafDrag  ) 
 

Drag&Drop implementation.

Allows dragging of elements that are embedded within a block element with an id starting with the string "dragme". The block element must be position/relative or position/absolute in order to be draggable.

SYNOPSIS

   <div id="dragme_123" style="position:relative">
   <input type="hidden" name="dragsrc" value="someidentifier">
      some text
   </div>

The style object of the currently dragged object, null if no element is currently dragged

Pointer to the currently dragged object.

Pointer to the element that was clicked in order to start the drag.

true if browser is IE-ish

The saved horizontal position the dragged object originally had

The saved vertical position the dragged object originally had

The time when the current drag started

True if the last mouseup event was related with a drag&drop action

True if between the last startDrag() and endDrag() a drag() call occured.

Register event handlers

Starts dragging the currently clicked object. This is thought to be used as a mousedown event handler.

After startDrag() the currently dragged object is moved via this method. This is supposed to be used as a mousemove handler.

Terminates the current drag action. This is supposed to be used as a mouseup handler.

Restores the position of the element that was most recently dragged.

Returns true if the latest mouseup action was related with a drag (or rather a drop). In order for an action to be considered as a drag&drop, an element marked for dragging (id = "dragme...") must have been clicked, it must have been moved and the whole action must have endured at least 300ms.

boolean

new SwafOnload swaf_makedraggable   ) 
 


Variable Documentation

var swaf_dragger = new SwafDrag()
 

The current drag&drop handler (SwafDrag).

It does not make too much sense to have more than one drag&drop handler with only one single mouse :-). Therefore one SwafDrag instance is setup by default and can be accessed via this global variable.


Generated on Sat May 19 01:18:28 2012 for Big Sister Web Application Framework by  doxygen 1.4.5