]> dev.renevier.net Git - syj.git/blobdiff - public/js/syj.js
better print support
[syj.git] / public / js / syj.js
index a297706556f1b0f0c406de57e3d208724e2c5ea8..a72dbb71ff6a99d114bf93c1985f1da665cc59f3 100644 (file)
@@ -441,6 +441,13 @@ var SYJView = {
         } else {
             this.map.setCenter(center, zoom);
         }
+        this.resizeMap();
+    },
+
+    resizeMap: function() {
+        var map = $('map');
+        map.style.width = map.offsetWidth.toString() + 'px';
+        map.style.height = map.offsetHeight.toString() + 'px';
     },
 
     observer: function(evt) {
@@ -1272,3 +1279,7 @@ window.onbeforeunload = function() {
         return undefined;
     }
 };
+
+window.onresize = function() {
+    SYJView.resizeMap();
+};