dojo/dnd/Mover (version 1.10)

dojo/Evented

Summary

an object which makes a node follow the mouse, or touch-drag on touch devices. Used as a default mover, and as a base class for custom movers.

Usage

var foo = new Mover(node,e,host);
dojo/dnd/Mover
Parameter Type Description
node Node

a node (or node's id) to be moved

e Event

a mouse event, which started the move; only pageX and pageY properties are used

host Object
Optional

object which implements the functionality of the move, and defines proper events (onMoveStart and onMoveStop)

See the dojo/dnd/Mover reference documentation for more information.

Method Summary

  • destroy() stops the move, deletes all references, so the object can be garbage-collected
  • emit(type,event)
  • on(type,listener)

Event Summary

  • onFirstMove(e) makes the node absolute; it is meant to be called only once. relative and absolutely positioned nodes are assumed to use pixel units
  • onMouseMove(e) event processor for onmousemove/ontouchmove
  • onMouseUp(e)

Methods

destroy()
Defined by dojo/dnd/Mover

stops the move, deletes all references, so the object can be garbage-collected

emit(type,event)
Defined by dojo/Evented
Parameter Type Description
type undefined
event undefined
Returns:undefined
on(type,listener)
Defined by dojo/Evented
Parameter Type Description
type undefined
listener undefined
Returns:undefined

Events

onFirstMove(e)
Defined by: dojo/dnd/Mover

makes the node absolute; it is meant to be called only once. relative and absolutely positioned nodes are assumed to use pixel units

Parameter Type Description
e undefined
onMouseMove(e)
Defined by: dojo/dnd/Mover

event processor for onmousemove/ontouchmove

Parameter Type Description
e Event

mouse/touch event

onMouseUp(e)
Defined by: dojo/dnd/Mover
Parameter Type Description
e undefined
Error in the documentation? Can’t find what you are looking for? Let us know!