I'm just starting with snap.svg. The element.drag()
function provides a set of defaults if no parameters are passed, otherwise you have to define your own onmove
, onstart
and onend
functions.
The parameters for onmove(dx,dx,x,y,event)
can be used in your implementation of onmove
to move the element.
If I create a group of elements, the default g.drag()
allows the group to move but I can't figure out what to put in my own onmove
to make the group move.
this.attr({cx: posx , cy: posy});
works for a .circle
. What are the equivalent x
,y
for a .group
?