Overview | File | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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.

Constructor Detail

### draw2d.Draggable

    draw2d.Draggable(oElement, iConstraints)

Encapsulates the functionality for a draggable element.

Method Detail

### 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.

Overview | File | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Documentation generated by JSDoc on Thu Feb 7 23:45:47 2008