Author:   Lars Michelsen <[email protected]>
Date:     Wed Nov  6 23:02:45 2013 +0100
Committer:   Lars Michelsen <[email protected]>
Commit-Date: Wed Nov  6 23:02:45 2013 +0100

Adapting fill zoom on page resize

---

 share/frontend/nagvis-js/classes/NagVisMapView.php |    1 +
 share/userfiles/templates/default.map.html         |    2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/share/frontend/nagvis-js/classes/NagVisMapView.php 
b/share/frontend/nagvis-js/classes/NagVisMapView.php
index 945dd5a..fa9fde5 100644
--- a/share/frontend/nagvis-js/classes/NagVisMapView.php
+++ b/share/frontend/nagvis-js/classes/NagVisMapView.php
@@ -92,6 +92,7 @@ class NagVisMapView {
             'stateProperties'    => json_encode($_MAINCFG->getStateWeightJS()),
             'userProperties'     => $USERCFG->doGetAsJson(),
             'mapName'            => $this->name,
+            'zoomFill'           => $this->MAPCFG->getValue(0, 'zoom') == 
'fill',
             'fileAges'           => json_encode(Array(
                 'maincfg'   => $_MAINCFG->getConfigFileAge(),
                 $this->name => $this->MAPCFG->getFileModificationTime(),
diff --git a/share/userfiles/templates/default.map.html 
b/share/userfiles/templates/default.map.html
index 36c31f0..affdc84 100644
--- a/share/userfiles/templates/default.map.html
+++ b/share/userfiles/templates/default.map.html
@@ -18,6 +18,6 @@ gridParse();
 
 // This disables the context menu when someone clicked anywhere on the map
 document.onmousedown = contextMouseDown;
-window.onresize = function() { scaleView(); };
+window.onresize = function() { scaleView(); {if 
$zoomFill}set_zoom('fill');{/if} };
 window.onscroll = function() { scaleView(); };
 </script>


------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins

Reply via email to