- From: AdrianBV <pasadi97@hotmail.com>
- Date: Fri, 28 May 2010 12:52:46 -0700 (PDT)
- To: www-svg@w3.org
One temporary solution would be to use preserveAspectRatio="xMinYMin meet" that will put all the svg's starting from 0,0 so automatically the clientX-iFrameX and clientY-iFrameY are in the viewbox space. The actual starting x and y coordinates would be controlled by putting the enclosing iFrame in the right position. Now I want to ask one more question , how would be possible to get the scale factor or zoom factor for the svg automatically? If you have other solutions to the original question please let me know. AdrianBV wrote: > > Hi, > > Basically I have an svg "SecondSVG" into an svg "FirstSVG" into an svg > "MainSVG".Every svg has its own ViewBox. This page can be loaded anywhere > on the screen by another page. > So basically how can i find the screen x for viewBox for"SecondSVG" > knowing that this svg can be loaded basically anywhere based on the > calling page? > event.clientX gives myself the x coordinate for the screen. If I don't > know the coordinate for ViewBox of "SecondSVG" then how can I find out the > x coordinate inside the ViewBox of "SecondSVG"? > I want to add more information. I am using Firefox 3.6.3 and I do have an > event object from which I can extract clientX, clientY and other > coordinates that are relative to the screen. However what I need are the > coordinates inside the ViewBox. > > Best regards, > Adrian Pasarariu > -- View this message in context: http://old.nabble.com/From-Window-coordinates-to-ViewBox-coordinates-tp28707465p28711242.html Sent from the w3.org - www-svg mailing list archive at Nabble.com.
Received on Saturday, 29 May 2010 21:11:27 UTC