W3C home > Mailing lists > Public > www-svg@w3.org > November 2001


From: Jason Foster <jafoster@uwaterloo.ca>
Date: Thu, 22 Nov 2001 16:03:08 -0500
To: www-svg@w3.org
Message-Id: <54AEE22E-DF8C-11D5-B398-000393567E34@uwaterloo.ca>
I have been trying to figure out a way to selectively toggle the 
visibility of an element based on the zoom level.

The easy part was realizing that I need to capture an SVGZoom event 
using the "onzoom" attribute of the "svg" element.  The specification 
then goes on to say:

> A magnify operation has the effect of a supplemental scale and 
> translate transformation placed at the outermost level on the SVG 
> document fragment (i.e., outside the outermost 'svg' element).

What I can't figure out is how to determine the scale that is 
currently in use?  There doesn't seem to be a nice way to address 
this "virtual" transformation, which is the only way I can think of 
to determine the current zoom level.

On a related question, how would I go about specifying a zoom level 
programatically?  I imagine it would involve modifying this virtual 

Thanks for any assistance!

Jason Foster
Received on Thursday, 22 November 2001 16:03:13 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 March 2017 09:46:51 UTC