X-Git-Url: https://dev.renevier.net/?p=syj.git;a=blobdiff_plain;f=public%2Fjs%2Fsyj.js;h=a72dbb71ff6a99d114bf93c1985f1da665cc59f3;hp=a297706556f1b0f0c406de57e3d208724e2c5ea8;hb=36fd88b7c9509509dc20070dae48883abe01a3fa;hpb=f4bf761bc8fcb7bb3505a5e1e878952024b06834 diff --git a/public/js/syj.js b/public/js/syj.js index a297706..a72dbb7 100644 --- a/public/js/syj.js +++ b/public/js/syj.js @@ -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(); +};