Methods
_down (evt)
private
documon/template/assets/js/documon/Draggable.js
268
The mouse "down" listener function
_initMove (evt)
private
documon/template/assets/js/documon/Draggable.js
285
A one-time setup to extablish the starting position and create the (mask)[#maks].
Parameters
evt
MouseEvent
Transfered from teh "move" listener.
_move (evt)
private
documon/template/assets/js/documon/Draggable.js
325
The mouse "move" listener function
_up (evt)
private
documon/template/assets/js/documon/Draggable.js
398
The mouse "up" listener function
callback (obj, pos, kind, didmove, arg)
protected
documon/template/assets/js/documon/Draggable.js
257
The function to ping when an operation occurs.
Parameters
obj
object
The internal object we use to manage the
pos
object
An object with the following properties: left, top
kind
string
The kind of operation that occured. Can be "start" | "end" | "move"
didmove
boolean
Indicates if the item was simply clicked, or if it was dragged. Only issued when event == "end"
arg
any
The argument that was defined during initialization.
destroy ()
documon/template/assets/js/documon/Draggable.js
442
Destroys and removes listeners.
init (params)
protected
documon/template/assets/js/documon/Draggable.js
229
Initialize
Parameters
params
object
See main class description for details.
parsePos (elem)
private
documon/template/assets/js/documon/Draggable.js
83
Gets the CSS position (releative) of a DOM Element.
setConstrain (val)
documon/template/assets/js/documon/Draggable.js
434
Causes the movement to be contrained along the X or Y axis.
Parameters
val
string
Use "x" or "y". Use "null" or no argument to clear contstraint.
setConstrainRect (val)
documon/template/assets/js/documon/Draggable.js
425
Sets the rectangle used to for the boundaries that the item can move within.
Parameters
val
Object
An object containing the following properties: x, y, width, height
. Use "null" or no argument to clear contstraint.
setX (evt, val)
private
documon/template/assets/js/documon/Draggable.js
48
Shortcut to set the style position.
Parameters
val
number
The x position in pixels.
setXY (evt, x, x)
private
documon/template/assets/js/documon/Draggable.js
71
Shortcut to set the style position.
Parameters
x
number
The x position in pixels.
x
number
The y position in pixels.
setY (evt, val)
private
documon/template/assets/js/documon/Draggable.js
59
Shortcut to set the style position.
Parameters
val
number
The y position in pixels.