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

Need help in zooming and panning of inline SVG..

Expand Messages
  • cs02433
    i have a SVG which is inline in a html document(not in a or tag). i want to provide zooming and panning support for it. i am using SVG
    Message 1 of 1 , Feb 1, 2011
    • 0 Attachment
      i have a SVG which is inline in a html document(not in a <object> or <embed> tag).
      i want to provide zooming and panning support for it.

      i am using SVG translate and scale to zoom and pan.

      // code snippet
      var k = root.createSVGMatrix().translate(p.x, p.y).scale(z).translate(-p.x, -p.y);
      setCTM(g, g.getCTM().multiply(k));

      but it is not zooming from mouse position rather it is shifting the svg in one direction.

      does anyone have better way of zooming an inline SVG.

      Thanks,
      Mukesh
    Your message has been successfully submitted and would be delivered to recipients shortly.