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 wrote:
> 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 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 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 the viewer can display. I want to
>>> find the area that the viewer displays so that I can modify the image based
>>> on what is currently displayed.
>>>
>>> I've normally layed out my displays so that this is not a problem. In this
>>> case, I do not have that option.
>>>
>>> Thanks,
>>> G. Wade
>>>
>>>
>>>
>>
>> -----
>> 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
>>
>>
>>
>>
>>
>>
>
>
>
--
___________________________________________________________________
andre m. winter,
cartography for internet and multimedia applications
schiessstand 4/1, a6091 goetzens, tyrol, austria
tel.: ++43.5234.32732
email: <[EMAIL PROTECTED]>
<http://www.vectoreal.com/> SVG consulting and development
<http://www.carto.net/> online cartography focusing on SVG
<http://www.carto.at/> print and online touristic map solutions
------------------------ Yahoo! Groups Sponsor --------------------~-->
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/2jUsvC/tzNLAA/TtwFAA/1U_rlB/TM
--------------------------------------------------------------------~->
-----
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/
<*> 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/