updateViewport

Updates inner settings of the viewport after external modifications and eventually redraws it.

Signatures

  •   Paramate.Viewport.updateViewport( doRedraw = true )

Details

The method should be called after the HTML viewport element has been modified by external means, e.g. after a resizing or repositioning.

Example

 [...]
 <body>
   <div id="viewPort"></div>
   <script type="text/javascript">
     configurator = new Paramate.Configurator({...});
     viewPort = new Paramate.Viewport({
       configurator: configurator,
       viewportElement: document.getElementById("viewPort")
     });
     configurator.viewPort = viewPort;
     configurator.initialize();

     // Move viewport.
     document.getElementById( "viewPort" ).style.left = "200px";
     viewPort.updateViewport();
   </script>
 [...]
 

Internal

The method stores all important information about the viewport.

Parameters

doRedraw

If this is 'true', the function will cause a redraw of the viewport after updating. (Default is 'true'.)