W3C home > Mailing lists > Public > www-svg@w3.org > September 2005

[SVG] zoomAndPan needs clarification (was: Re: [SVG] assigning to currentScale)

From: Jonathan Watt <jonathan.watt@strath.ac.uk>
Date: Mon, 19 Sep 2005 19:39:16 +0100
Message-ID: <432F05D4.9000506@strath.ac.uk>
To: www-svg@w3.org
CC: Robin Berjon <robin.berjon@expway.fr>

Robin Berjon wrote:
 >
 >Jonathan Watt wrote:
 >>
 >> Hi Chris,
 >>
 >> Chris Lilley wrote:
 >>
 >>> On Sunday, September 18, 2005, 10:40:24 PM, Jonathan wrote:
 >>>
 >>> JW> On a related note, what should happen when zoomAndPan="disable"
 >>> and an JW> attempt is made to assign to currentScale?
 >>>
 >>> Hmm, depends on whether zoomAndPan="disable" disables the user zoom
 >>> controls or disables zooming. I believe it disables the controls, so
 >>> zooming via script should still work. Indeed, i think the main reason
 >>> people use zoomAndPan="disable" is so that they can give a more
 >>> context-sensitive zoom interface in script (eg a map panner with a
 >>> thumbnail).
 >>
 >>
 >> I see, thanks. It might be worth a note in the errata and new specs 
that
 >> makes this explicit.
 >
 > If it's not clear yes. Suggested text welcome! :)
 >

To be honest I'd rather that the zoomAndPan attribute be deprecated. 
Firefox ignores it and will continue to do so even if we implement zoom 
and pan controls since we put a higher priority on user control than 
author control. I see no strong case for it to even exist to be frank. 
Properly written document author controls (making use of SVG events) 
should be able to coexist with the UA's controls. Having said that, 
here's some suggested rewording to get you started.

 From the spec.:

"float currentScale
"If "magnification" is enabled (i.e., zoomAndPan="magnify"), then the 
effect is as if an extra transformation were placed at the outermost 
level on the SVG document fragment"

Too me, that strongly suggests if "magnification" is disabled (i.e., 
zoomAndPan="disable"), then the effect of currentScale is *not* as if an 
extra transformation were placed at the outermost level on the SVG 
document fragment. Hence I'd suggest rewording along the lines of:

"The effect of this attribute is as if an extra transformation were 
placed at the outermost level on the SVG document fragment, regardless 
of whether "magnification" is disabled (i.e., zoomAndPan="disable")"

Also later in the spec.:

"If disable, the user agent shall disable any magnification and panning 
controls and not allow the user to magnify or pan on the given document 
fragment."

This isn't clear that the UA's controls are being refered to here. I'd 
suggest rewording along the lines of:

"If disable, the user agent shall disable any magnification and panning 
controls it provides. The document may still implement its own 
magnification and panning controls by manipulating currentScale and 
currentTranslate."

Regards,
Jonathan
Received on Monday, 19 September 2005 18:39:21 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:31 GMT