Re: [SVG] assigning to currentScale

On Sunday, September 18, 2005, 10:40:24 PM, Jonathan wrote:

JW> SVG WG,

JW> Since the implementation of SVG events in Firefox it has become apparent
JW> that it's necessary for us to restrict the range of values that we allow
JW> to be assigned to currentScale (for various reasons).

What reasons, beyond the 'ASV does it' one below?

JW>  ASV restricts how
JW> far you can zoom in/out using it's GUI, but doesn't seem to place any 
JW> restriction on scripts. As a result it just seems to just break if you 
JW> assign a very small or very large value to currentScale. The question 
JW> is, how should an implementation behave when it has to limit the range 
JW> of values that can be assigned to currentScale?

The viewer should not limit the scale.

I have had cases where I had to set a particular initial view on an SVG
document, just because ASV did not allow me to zoom far enough in to see
everything if the initial view covered the entire graphic.

Corel SVG Viewer was better in this respect and allowed a much larger
degree of zoom.

JW> 1) clamp the value to an acceptable range and return no error
JW> 2) return an error and leave currentScale with its previous value
JW> 3) something else

JW> Having clarified this issue, please add errata items for the spec to 
JW> inform content authors that they should check the value assigned to 
JW> currentScale was accepted/be prepared to catch an error/something else.

Okay, but I don't see anything in the spec that supports limiting the
zoom range.

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).


-- 
 Chris Lilley                    mailto:chris@w3.org
 Chair, W3C SVG Working Group
 W3C Graphics Activity Lead
 Co-Chair, W3C Hypertext CG

Received on Monday, 19 September 2005 15:34:43 UTC