new ludo.svg.Drag(config,)
Class for dragging {{#crossLink "canvas/Node"}}{{/crossLink}} elements.
Parameters:
Name | Type | Description |
---|---|---|
config, |
Object | see {{#crossLink "effect/Drag"}}{{/crossLink}} |
- Source:
Example
var canvas = new ludo.svg.Canvas({ renderTo:document.body }); var paintThree = new ludo.svg.Paint({ autoUpdate:true, css:{ 'fill' : '#DEF', 'stroke':'#888', 'stroke-width':'5', cursor:'pointer' } }); var circle = new ludo.svg.Circle({cx:280, cy:280, r:85}, { paint:paintThree }); canvas.append(circle); var drag = new ludo.svg.Drag(); drag.add(circle);
Extends
- effect.Drag
Methods
-
add(node) → {effect.DraggableNode}
-
Add node
Parameters:
Name Type Description node
ludo.effect.DraggableNode - Source:
Returns:
added node
- Type
- effect.DraggableNode