API Docs for: 1
Show:

effect.DraggableNode Class

Defined in: js/ludo-all.js:1035
Module: language

Specification of a draggable node objects sent to add. You will never create objects of this class.

Item Index

Properties

directions

String

Defined in js\ludo-all.js:1120

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

el

String | HTMLDivElement

Defined in js\ludo-all.js:1068

Reference to dragable DOM node

Default: undefined

handle

String | HTMLDivElement

Defined in js\ludo-all.js:1075

Reference to handle for dragging. el will only be draggable by dragging the handle.

Default: undefined

id

String

Defined in js\ludo-all.js:1043

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

Defined in js\ludo-all.js:1093

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

Defined in js\ludo-all.js:1111

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

Defined in js\ludo-all.js:1084

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

Defined in js\ludo-all.js:1102

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