1 Reply Latest reply on Apr 8, 2009 9:56 PM by anirudhs

    Pan window



      I am creating Pan & Zoom window as in Microsoft Visio/Google maps. How do I scroll/move scrollbars of the main canvas with regard to panning done in the pan window. What calculation should I do?


      Please help.


      Thanks in advance.

        • 1. Re: Pan window
          anirudhs Level 2

          Hi Vijay,


          You can scroll a canvas programatically by setting horizontalScrollPosition and verticalScrollPosition.


          Though ideally, you should be writing your own component that handles its own scrolling by extending ScrollControlBase. Clicking any of the pan controls should increase the corresponding scrollPosition so that masking and positioning is done correctly.


          At a low level, the things you should know about are how a mask works (Look at livedocs for UIComponent) and on updating the x & y of your map child component.