Generic function used for draging ojects. For each dragable object should be defined function onDragUpdate(dx,dy): e.g. moving only in x direction etc.
This:
Parameters:
Name |
Type |
Description |
dx |
number
|
x increment of dragging |
dy |
number
|
y increment of dragging |
- Source:
-
/var/www/html/software/raphaeltools/raphaeltools.src.js, line 58
Example
c = RaphaelTools.Circle.create(100,59,20);
c.obj.onDragUpdate = function(dx,dy) { c.obj.translate(dx,dy); }
c.obj.drag(onDragMove,onDragStart,onDragStop) // make an object draggable using c.onDragUpdate() function when moving