George Armhold wrote:
Hi, I'm having some trouble with JSVGCanvas, JSVGScrollPane, and probably my understanding of the viewPort and viewBox.
I'm trying to create an extension of JSVGCanvas that allows users to view and scroll around documents. My goal is to eventually provide a View menu from which users can select a zoom level (50%, 100%, 200% etc) and have the image zoomed as appropriate. I would like the JSVGScroller to add scrollbars when needed, allowing the user to pan around the doc when the current zoom level does not fit into the viewable screen.
The trouble is that whenever I add a doc to the canvas, it seems to be
automatically scaled to perfectly fit the canvas, rather than getting
"clipped" to fit the window.
This can be changed by overriding calculateViewingTransform on JSVGComponent. I think you can just have this return the identity Transform.
Also if I then resize my window to make the canvas smaller, I finally do get scrollbars, but they do not match non-visible regions of the document- I can only scroll a tiny percentage of the "off-screen" area.
Do you have this problem with the sample ScrollExample in contrib?
I suspect that I'm missing something fundamental here.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]