effect.DraggableNode Class
Specification of a draggable node objects sent to add. You will never create objects of this class.
Properties
directions
String
Allow dragging in these directions. This is an optional argument. If not set, you will use the params set when creating the ludo.effect.Drag component if any.
Default: 'XY'
Example:
directions:'XY' //
..
directions:'X' // Only allow dragging along x-axis
..
directions:'Y' // Only allow dragging along y-axis
handle
String | HTMLDivElement
Reference to handle for dragging. el will only be draggable by dragging the handle.
Default: undefined
id
String
id of node. This attribute is optional
Default: undefined
Example:
var dragDrop = new ludo.effect.Drag();
var el = new Element('div');
dragDrop.add({
id: 'myId',
el : el
});
var ref = dragDrop.getById('myId');
Or you can use this code which does the same:
var dragDrop = new ludo.effect.Drag();
var el = new Element('div');
el.id = 'myId';
dragDrop.add(el);
var ref = dragDrop.getById('myId');
Id's are only important if you need to access nodes later using effect.Drag/getById
maxX
Number
Maximum x position. This is an optional argument. If not set, you will use the params set when creating the ludo.effect.Drag component if any.
Default: undefined
maxY
Number
Maximum y position. This is an optional argument. If not set, you will use the params set when creating the ludo.effect.Drag component if any.
Default: undefined
minX
Number
Minimum x position. This is an optional argument. If not set, you will use the params set when creating the ludo.effect.Drag component if any.
Default: undefined
minY
Number
Minimum x position. This is an optional argument. If not set, you will use the params set when creating the ludo.effect.Drag component if any.
Default: undefined