>>>>> "WH" == William Huang <[EMAIL PROTECTED]> writes:
WH> I have a problem with regard to displaying several scrollable WH> content blocks in separate areas of a single window if the height WH> and width of these dynamic blocks can't fit into. This question is WH> similar to the question you answered on Wed, 31 Jul 2002 ("Re: WH> Newbie Question JSVGComponent"). I think two possible approaches WH> for my situation is number 1 and number 3. WH> To use no. 1 approach, I can create multiple JSVGCanvas objects WH> and put scroll functionality into these JSVGCanvas objects. The WH> scrolling functionality should be easy to achieve. Since I want to WH> keep these content blocks in a single SVG file although I also use WH> xlink to display external SVG files as image elements on one of WH> these areas, I prefer the no.3 approach. WH> To use the no.3 approach, I need to use Javascript to make WH> scrollpane/scrollbar for a content block if its size is larger WH> than the restricted area size, then use mouse events for scrolling WH> control. Could you tell me which approach is better for my WH> question? And could you give me some suggestions about the WH> Javascript implementation? It sounds to me like #1 is better. First off you should get better performance scrolling in this case (for 'static' documents Batik's JSVGCanvas does a bunch of caching of the final rendered content just so scrolling/panning will be faster - on complex documents this can be very important). I think someone posted a scrolled implementation of JSVGCanvas to the list (but it was a while ago). Doing #3 would require a fair amount of Java Script code. Implementing usable scrollbars in javascript would probably be a major pain. I know there are some projects that are creating SVG based widget sets but most of them are targeted at the Adobe Viewer and I'm not sure Batik implements enough of the DOM for them to work. If you are going to try and do #3 you probably want to use an svg element for the body of the scroll pane (as this automatically clips to it's bounds), then have a g child that the scroll bars update the transform on to scroll the document. Good luck! --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]