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 征宇 王 <tr...@yahoo.com.cn> on 2005/03/26 16:05:03 UTC

Problem about the JSVGScrollCanvas and JSVGViewport

Hi,I have used the JSVGScrollCanvas and JSVGViewport created by
 Zachary DelProposto.After my SVGDom is load,I can see ScrollBar at bottom and left.But the scrollbar can not scroll at all.Only after I used "shift+mouse" to "pan" the SVG,the scrollBars worked well.Could anyone tell me how can I get scrollbars work correctly just when the DOM is loaded.Thx



---------------------------------
Do You Yahoo!?
150万曲MP3疯狂搜,带您闯入音乐殿堂
美女明星应有尽有,搜遍美图、艳图和酷图
1G就是1000兆,雅虎电邮自助扩容!

Re: Problem about the JSVGScrollCanvas and JSVGViewport

Posted by Thomas DeWeese <Th...@Kodak.com>.
Hi 征宇 王,

   The default behavior (in fact the one prescribed by the
SVG spec) is that when the content has a viewBox the viewBox
is fitted to the visible area.  Since the extent of the
scrollbars is limited to the viewBox there is nothing for the
scrollbars to scroll, everything is visible.

   If you don't want this behavior you can change the
'calculateViewingTransform' method of the JSVGCanvas so
it doesn't fit the content to the viewable space.

   The scrollbar should then be visible.

   Also you may be aware that Batik now includes an updated
version of Zachary's original JSVGScrollCanvas (I'm not sure
what the JSVGViewport is).

征宇 王 wrote:
> Hi,I have used the JSVGScrollCanvas and JSVGViewport created by
>  Zachary DelProposto.After my SVGDom is load,I can see ScrollBar at 
> bottom and left.But the scrollbar can not scroll at all.Only after I 
> used "shift+mouse" to "pan" the SVG,the scrollBars worked well.Could 
> anyone tell me how can I get scrollbars work correctly just when the DOM 
> is loaded.Thx

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org