dojox/mdnd/Moveable (version 1.10)

Summary

Allow end-users to track a DOM node into the web page

Usage

var foo = new Moveable(params,node);
dojox/mdnd/Moveable
Parameter Type Description
params Object

Hash of parameters

node DOMNode

The draggable node

See the dojox/mdnd/Moveable reference documentation for more information.

Property Summary

  • dragDistanceThe user clicks on the handle, but the drag action will really begin if he tracks the main node to more than 3 pixels.
  • handleThe node on which the user clicks to drag the main node.
  • skipA flag to control a drag action if a form element has been focused.

Method Summary

  • destroy() Delecte associated events
  • initOffsetDrag(e) Initialize the gap between main node coordinates and the clicked point.
  • isFormElement(e) identify the type of target node associated with a DOM event.

Event Summary

  • onDrag(node,coords,size,mousePosition) Stub function.
  • onDragEnd(node) Stub function Notes : Coordinates don't contain margins
  • onDragStart(node,coords,size) Stub function.
  • onFirstMove(e) Occurs when the user moves the mouse after clicking on the handle.
  • onMouseDown(e) Occurs when the user clicks on the handle node.
  • onMouseUp(e) Occurs when the user releases the mouse Calls the onDragEnd method.
  • onMove(e) Occurs when the user moves the mouse.

Properties

dragDistance
Defined by: dojox/mdnd/Moveable

The user clicks on the handle, but the drag action will really begin if he tracks the main node to more than 3 pixels.

handle
Defined by: dojox/mdnd/Moveable

The node on which the user clicks to drag the main node.

skip
Defined by: dojox/mdnd/Moveable

A flag to control a drag action if a form element has been focused. If true, the drag action is not executed.

Methods

destroy()
Defined by dojox/mdnd/Moveable

Delecte associated events

initOffsetDrag(e)
Defined by dojox/mdnd/Moveable

Initialize the gap between main node coordinates and the clicked point. Call the onDragStart method.

Parameter Type Description
e DOMEvent

A DOM event

isFormElement(e)
Defined by dojox/mdnd/Moveable

identify the type of target node associated with a DOM event.

Parameter Type Description
e DOMEvent

a DOM event

Returns:any | boolean

if true, the target is one of those specific nodes.

Events

onDrag(node,coords,size,mousePosition)
Defined by: dojox/mdnd/Moveable

Stub function. Notes : border box model for size value, margin box model for coordinates

Parameter Type Description
node DOMNode

a DOM node

coords Object

position of the main node (equals to css left/top properties)

size Object

an object encapsulating width and height values

mousePosition Object

coordiantes of mouse

onDragEnd(node)
Defined by: dojox/mdnd/Moveable

Stub function Notes : Coordinates don't contain margins

Parameter Type Description
node DOMNode

a DOM node

onDragStart(node,coords,size)
Defined by: dojox/mdnd/Moveable

Stub function. Notes : border box model

Parameter Type Description
node DOMNode

a DOM node

coords Object

absolute position of the main node

size Object

an object encapsulating width an height values

onFirstMove(e)
Defined by: dojox/mdnd/Moveable

Occurs when the user moves the mouse after clicking on the handle. Determinate when the drag action will have to begin (see dragDistance).

Parameter Type Description
e DOMEvent

A DOM event

onMouseDown(e)
Defined by: dojox/mdnd/Moveable

Occurs when the user clicks on the handle node. Skip the drag action if a specific node is targeted. Listens to mouseup and mousemove events on to the HTML document.

Parameter Type Description
e DOMEvent

a DOM event

onMouseUp(e)
Defined by: dojox/mdnd/Moveable

Occurs when the user releases the mouse Calls the onDragEnd method.

Parameter Type Description
e DOMEvent

a DOM event

onMove(e)
Defined by: dojox/mdnd/Moveable

Occurs when the user moves the mouse. Calls the onDrag method.

Parameter Type Description
e DOMEvent

a DOM event

Error in the documentation? Can’t find what you are looking for? Let us know!