You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by th...@kodak.com on 2007/07/11 12:37:43 UTC
Re: JSVGCanvas problem seeing long svgs
Hi Emmy,
"Emmy Alex" <ea...@hermes.tietronix.com> wrote on 06/28/2007 05:03:59 PM:
> I am trying to display an svg by using JSVGCanvas (batik1.7beta1):
> When the Canvas viewer is small it clips the svg and does not show
> the svg even when I pull down to increase the length of my svg
> viewer. If prior to loading the svg i increase its length then I am
> able to see the svg in its entire length. I see this problem with
> batik-squiggle browser as well.
This is because you have set neither width/height or viewBox
attributes on the root SVG Element. This means that the document
should conform it's self to the viewport provided by the User Agent.
If you don't want it to clip the document you need to tell it what
you want to view. I would suggest setting viewBox.
> I will have svgs that are longer that my screen so they will never
> be displayed because I cannot make my viewer longer than what my
> screen is. Would you know where I can set a property or use an api
> so that however long the svg is my EclipseJSVGCanvas viewer renders
> the entire svg without clipping it and I can view the entire svg
> when i scroll the canvas? I have scrolling facility in my canvas.
Setting the viewBox attribute on the root SVG element will fix this.
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org