Re: [SVG] assigning to currentScale

Jonathan Watt wrote:
> Robin Berjon wrote:
>> Imho, a bad idea. Scrollbars should occur when the width and height 
>> attributes of the root 'svg' element are too big to fit a given area. 
> 
> Which is never since as far as I can tell in Firefox's case it should 
> always override these values.
> 
>   http://www.w3.org/TR/SVG11/coords.html#ViewportSpace

I was thinking about the case where you'd set width='2000px' and FF's 
window is only 800px wide.

>> Panning to content outside the viewport should imho be done with such 
>> UI devices as Alt+drag.
> 
> Use of modifier keys was one of the reasons ASV style panning is being 
> opposed.

Yes, I understand that it's a usability issue. However scrollbars have 
their own issues, the smallest of which being that they take up space, 
but the most important being clearly that the SVG canvas is infinite and 
it's going to be hard to figure out what to do to provide the right 
behavior.

>  > The two interaction concepts are separate and
>> mixing them doesn't seem to me to be appropriate.
> 
> Agreed, but this issue needs to be clarified. Should panning be 
> unlimited?

Unfortunately, yes. Consider this example: I create a drawing 
application in SVG inside Firefox. The expectation is that people will 
be able to place points all over it. If the canvas is initially empty, 
how will one go to a location outside of FF's expected pan space?

> Or is there an inherent region to which 
> panning can/should be restricted? If so, what is it.

This is not spec material, but there are several strategies you can adopt:

  - don't use scrollbars at all. This is what app developers expect most 
(but not all) of the time, but it has genuine usability problems.

  - decide that your pan space is limited (which it likely is anyway) 
and provide scrollbars for that. That will be very marginally useful 
since your pan-space is likely humongous anyway. If you've ever used 
Illustrator, you'll know that panning with the scrollbars is one thing 
that tends to confuse beginners because there's so much space to pan to. 
In this option you get neither developer expectations nor usability.

  - create a pan space with scrollbars based on the bounding box of the 
root svg element. This should give you reasonable-sized scrollbars, but 
you'll have to be careful to keep it up to date, and to allow users to 
scroll out of it (perhaps with modifier keys) so that content can 
interactively be added outside of that area.

None of these approaches is perfect. Whichever one you pick please make 
them author-controllable (and user-overridable).

> And what means are 
> there available for scripts to determine that a value they set on 
> currentTranslate is invalid?

If by invalid you mean that they get clamped I agree with Jim's analysis 
that implementation limitations shouldn't raise errors. Failing silently 
doesn't sound so bad here.

-- 
Robin Berjon
   Senior Research Scientist
   Expway, http://expway.com/

Received on Tuesday, 20 September 2005 10:03:16 UTC