Loading ...
Sorry, an error occurred while loading the content.
 

Re: SVG to Mouse Coordinates

Expand Messages
  • Jeff Schiller
    If anyone s curious I whipped up a quick article on this: http://blog.codedread.com/archives/2005/12/21/how-to-enable-dragging-in-svg/
    Message 1 of 3 , Dec 21, 2005
      If anyone's curious I whipped up a quick article on this:
      http://blog.codedread.com/archives/2005/12/21/how-to-enable-dragging-in-svg/

      --- In svg-developers@yahoogroups.com, "Jeff Schiller"
      <jeff_schiller@h...> wrote:
      >
      > Never mind. I got it working now.
      >
      > http://www.codedread.com/dragtest2.svg
      >
      > Regards,
      > Jeff
      >
      > --- In svg-developers@yahoogroups.com, "Jeff Schiller"
      > <jeff_schiller@h...> wrote:
      > >
      > > I made http://www.codedread.com/dragtest.svg that tests dragging of an
      > > SVG <circle> element around by following this post:
      > > http://groups.yahoo.com/group/svg-developers/message/52701 by Jonathan
      > > Watt. Works great in IE+ASV, a little slow in Fx 1.5 and it seems
      > > that Opera 9 TP1 doesn't support getScreenTCM().
      > >
      > > However, if I want to generalize this to a variety of objects, I can't
      > > use cx or cy, nor can I use x or y. I have to use the transform
      > > attribute, but when I try to do this, it changes the TCM of that
      > > entity I'm getting all confused. Can anyone help me out with this or
      > > point me to an example?
      > >
      > > Ultimately, I'd like to be able to drag around a variety of SVG
      > > objects like this:
      > >
      > > <circle id="ball" cx="0" cy="0" r="200" transform="translate(400,300)"
      > > ... />
      > >
      > > <rect id="box" x="0" y="0" width="300" height="300"
      > > transform="translate(500,500)" ... />
      > >
      > > <g id="arbitrary_shape" transform="translate(1000,800)">....</g>
      > >
      > > Thanks,
      > > Jeff Schiller
      > >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.