--- In [email protected], Erik Dahlström <[EMAIL PROTECTED]> wrote: > > On Mon, 03 Dec 2007 22:29:40 +0100, brucerindahl <[EMAIL PROTECTED]> wrote: > > > I am getting different results in various browsers in the getBBox() > > function. Using the code: > > > > <svg xmlns="http://www.w3.org/2000/svg" > > onload="g_onload()"> > > > > <defs> > > <script> > > <![CDATA[ > > > > function g_onload() { > > var test = document.getElementById("test") > > var bbox = test.getBBox() > > alert("x="+bbox.x+" y="+bbox.y+" width="+bbox.width+" > > height="+bbox.height) > > } > > > > ]]> > > </script> > > </defs> > > > > <g id="test" > > > <rect x="10" y="10" width="25" height="10" /> > > <g display="none" > > > <rect x="10" y="20" width="50" height="10" /> > > </g> > > </g> > > </svg> > > > > to test, I think the second rectangle should not be computed in the > > BBox because of the display="none" attribute so the results in the > > alert box should read: "x=10 y=10 width=25 height=10" > > That is the result I get in Opera 9.2x and 9.5, Safari 3, Firefox 3, Batik > 1.7. > > > Result 2 is "x=10 y=10 width=50 height=20" when the second rectangle > > is also computed. > > > > Which is correct? > > Result 1 AFAIK. > > > Current results: > > IE/ASV Result 2 > > Opera Result 2 > > Strange that you get a different result here, do you have any more data? > Like Opera version+buildnumber, platform and OS version? > > Cheers > /Erik > > -- > Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ > Major screwup on my part! I meant to say Opera gives Result 1. I was testing on the various platforms and the client uses IE/ASV so I was getting different results. Sorry about the confusion. Bruce
----- To unsubscribe send a message to: [EMAIL PROTECTED] -or- visit http://groups.yahoo.com/group/svg-developers and click "edit my membership" ---- Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/svg-developers/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/svg-developers/join (Yahoo! ID required) <*> To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

