W3C home > Mailing lists > Public > www-svg@w3.org > June 2006

Default value of SVGFitToViewBox.viewBox

From: Cameron McCormack <cam@mcc.id.au>
Date: Wed, 14 Jun 2006 17:00:58 +1000
To: www-svg@w3.org
Message-ID: <20060614070058.GB22792@port.mcc.id.au>


The viewBox attribute on the SVGFitToViewBox interface is an
SVGAnimatedRect that represents the value of a viewBox DOM attribute.
It isn’t stated anywhere in SVG 1.1 what values the viewBox object
should take when the viewBox attribute is not specified.

Some quick testing reveals the following default values:

  Opera 9 nightly	[0, 0, 0, 0]
  Firefox 1.5		[0, 0, 1, 1]
  ASV 3			unimplemented
  Batik SVN		unimplemented
  Webkit SVN		unimplemented

For the root svg element, the values in viewBox.baseVal could reflect
the current viewport as determined by the x, y, width and height
attributes.  A view element could also be updated accordingly in this

But for an svg element referenced by a use, or a marker, pattern or
symbol element, no definite values can be given as the viewport is
defined by the referencing element when no viewBox is specified.

What should the right thing be?



Cameron McCormack, http://mcc.id.au/
	xmpp:heycam@jabber.org  ▪  ICQ 26955922  ▪  MSN cam@mcc.id.au
Received on Wednesday, 14 June 2006 07:01:16 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 March 2017 09:47:08 UTC