Class draw2d.Draggable
Object
|
+--EventTarget
|
+--draw2d.Draggable
- class
draw2d.Draggable
- extends EventTarget
Defined in dragdrop.js
|
Constructor Summary |
draw2d.Draggable
(oElement, iConstraints)
Encapsulates the functionality for a draggable element.
|
|
Method Summary |
Object
|
construct(<HTMLElement> oElement , <int> iConstraints )
Creates a new instance based on the given element and the constraints.
|
void
|
detachEventHandlers()
Detaches event handlers for the mousemove and mouseup events.
|
Object
|
getDropTarget( x , y )
Determines the drop target that the mouse is over.
|
Object
|
getLeft()
Returns the left coordinate of the element.
|
Object
|
getTop()
Returns the top coordinate of the element.
|
draw2d.Draggable
draw2d.Draggable(oElement, iConstraints)
Encapsulates the functionality for a draggable element.
construct
Object construct(<HTMLElement> oElement , <int> iConstraints )
Creates a new instance based on the given element and the constraints.
Parameters:
oElement - The DOM element to make draggable.
iConstraints - The rules for dragging.
detachEventHandlers
void detachEventHandlers()
Detaches event handlers for the mousemove and mouseup events.
getDropTarget
Object getDropTarget( x , y )
Determines the drop target that the mouse is over.
Parameters:
x - The x-coordinate of the mouse.
y - The y-coordinate of the mouse.
Returns:
The drop target if the mouse is over one, null otherwise.
getLeft
Object getLeft()
Returns the left coordinate of the element.
Returns:
The left coordinate of the element.
getTop
Object getTop()
Returns the top coordinate of the element.
Returns:
The top coordinate of the element.
Documentation generated by
JSDoc on Thu Feb 7 23:45:47 2008