0

I have created an arrow using SVG

var arrow = gaugeSvg
    .path('M 0 0 L 40 -34 L 40 -14 L 80 -14 L 80 14 L 40 14 L 40 34 Z')
    .attr({'stroke': 'black', 'fill': 'black', 'enable': 'true'})
    .translate(left + width, goalY);

Now I want to drag this arrow vertically. How can it be done?

flu
  • 14,307
  • 8
  • 74
  • 71

1 Answers1

0

You can probably use Element.drag(). See Raphael documentation here http://raphaeljs.com/reference.html#Element.drag

Cheers

phron
  • 1,795
  • 17
  • 23
  • Thanks for your reply but I have one query: Element.drag(onmove, onstart, onend, [mcontext], [scontext], [econtext]) in this fuction what should give as arguments ? – user3012072 Jan 07 '14 at 10:59
  • Have a look here http://stackoverflow.com/questions/3675519/raphaeljs-drag-and-drop, there'a a full explanation on how it works, how to implement it and a jsfiddle is provided too. Cheers – phron Jan 07 '14 at 11:16