Class blade.core.dragdrop.Draggable
Object
|
+--blade.base.Messenger
|
+--blade.core.dragdrop.Draggable
- class
blade.core.dragdrop.Draggable
- extends blade.base.Messenger
A draggable object. Used to control dragging and dropping of a JS DOM object.
Defined in dragdrop.js
Method Summary |
function
|
refresh()
Updates the target element's coordinates on the screen
|
function
|
setClipRegion(clipRegion)
Bounds the draggable to a rectangular region
|
function
|
setContainer(container)
Binds the draggable to a container
|
function
|
setPosition(position)
Sets a new position for the target element
|
blade.core.dragdrop.Draggable
function blade.core.dragdrop.Draggable(elt, pickup, drop)
Parameters:
elt
- target element's DOM object
pickup
- W3C event code to trigger picking up the object (e.g. "mousedown")
drop
- W3C event code to trigger dropping the object (e.g. "mouseup")
refresh
function refresh()
Updates the target element's coordinates on the screen
setClipRegion
function setClipRegion(clipRegion)
Bounds the draggable to a rectangular region
Parameters:
clipRegion
- a ClipRegion object to use as the bounds
setContainer
function setContainer(container)
Binds the draggable to a container
Parameters:
container
- Container object to bind to
See:- blade.core.screen.Container
setPosition
function setPosition(position)
Sets a new position for the target element
Parameters:
position
- Coordinate object representing the new position