[svg-developers] Screen extents

2005-12-11 Thread G. Wade Johnson
I know there must be an easy answer to this, but how do I get the actual width and height of the viewer. I am not looking for the width and height of the svg or for the viewBox values. I am building an SVG image on the fly and sending it to the viewer. This image may be larger than the area that t

Re: [svg-developers] Screen extents

2005-12-11 Thread Sean Montague
You could try innerWidth & innerHeight or if you have embeded it in html: parent.document.SvgMap.clientWidth parent.document.SvgMap.clientHeight G. Wade Johnson wrote: >I know there must be an easy answer to this, but how do I get the actual width >and height of the viewer. I am not looking for t

Re: [svg-developers] Screen extents

2005-12-12 Thread G. Wade Johnson
Thanks, Sean. But, innerWidth and innerHeight are ASV-specific, aren't they? I'm looking for a standards-compilant approach if possible. And, thanks for reminding me. The SVG is not embedded in HTML. G. Wade On Sun, 11 Dec 2005 21:50:52 -0700 Sean Montague <[EMAIL PROTECTED]> wrote: > You coul

Re: [svg-developers] Screen extents

2005-12-12 Thread thomas . deweese
Hi G. Wade svg-developers@yahoogroups.com wrote on 12/12/2005 07:56:05 AM: > But, innerWidth and innerHeight are ASV-specific, aren't they? I'm looking for > a standards-compilant approach if possible. You want to look at 'SVGSVGElement.viewport', this will give you an SVGRect the 'width' an

Re: [svg-developers] Screen extents

2005-12-12 Thread Andre M. Winter - Carto.net
hi g., var myDocElem = document.documentElement; try { // STANDARD METHOD myViewport = { myWidth : myDocElem.viewport.width, myHeight : myDocElem.viewport.height } } catch(e){ myViewport = { myWidth : window.innerWidth, myHeight : window.innerHeight } } andré G. Wade Johnson

Re: [svg-developers] Screen extents

2005-12-12 Thread Andre M. Winter - Carto.net
hi g., var myDocElem = document.documentElement; try { // STANDARD METHOD myViewport = { myWidth : myDocElem.viewport.width, myHeight : myDocElem.viewport.height } }

Re: [svg-developers] Screen extents

2005-12-12 Thread G. Wade Johnson
Hi Andre, (Wade is fine.) On Mon, 12 Dec 2005 14:13:39 +0100 "Andre M. Winter - Carto.net" <[EMAIL PROTECTED]> wrote: > hi g., > > var myDocElem = document.documentElement; > > try { // STANDARD METHOD > myViewport = { > myWidth : myDocElem.view

Re: [svg-developers] Screen extents

2005-12-12 Thread G. Wade Johnson
Just a quick note to correct the typos in my previous version, and to verify (for future readers of the list) that the following function works in both Batik and ASV (3 on Linux, at least). function getDisplaySize() { var extents = null; try { var view = document.documentElemen