move svg elements

puyan
04-08-2005, 03:28 AM
Hi there,
I'm trying to built a SVG in which the user becomes the opportunity to drag the elements with mouse.
did you know how can I do that?
cheers
puyan

Anonymous
04-08-2005, 05:01 AM
Here example
http://pilat.free.fr/english/routines/bouger.htm

It's old code ...
You can replace
evt.getTarget().getOwnerDocument()
by
evt.target.ownerDocument
and
evt.getClientX() evt.getClientY()
by
evt.clientX evt.clientY

You can also work on matrix using getCTM() ... to retieve current translate of object.

Michel

 
Web mp2kmag.com
mapforums.com

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum