]> git.openstreetmap.org Git - rails.git/commitdiff
Get the print stylesheet working again
authorTom Hughes <tom@compton.nu>
Thu, 8 Dec 2011 00:28:08 +0000 (00:28 +0000)
committerTom Hughes <tom@compton.nu>
Thu, 8 Dec 2011 00:28:08 +0000 (00:28 +0000)
app/assets/stylesheets/print.css
app/views/site/_resize.html.erb

index 98d74d99aa397323dc89d8d12aa5b484bc8a8bb0..a349ccfdedb212aabd4c13be1d8d1e79249e6ced 100644 (file)
 
 #map {
   border: 1px solid black;
+  margin: auto !important;
 }
 
 #attribution {
   font-size: 12px;
+  text-align: center;
 }
index 30ee81f05ccba84b2098988523af9c32a37c0613..c88f500527fd987c96d76fbe4ca0fddda3fa0402 100644 (file)
 
   function resizeMap() {
     var sidebar_width = 0 + $("#sidebar:visible").outerWidth(true);
-    var left_border = 0 + $("#map").css("border-left-width");
-    var right_border = 0 + $("#map").css("border-right-width");
-    var top_border = 0 + $("#map").css("border-top-width");
-    var bottom_border = 0 + $("#map").css("border-bottom-width");
+    var left_border = parseFloat($("#map").css("border-left-width"));
+    var right_border = parseFloat($("#map").css("border-right-width"));
+    var top_border = parseFloat($("#map").css("border-top-width"));
+    var bottom_border = parseFloat($("#map").css("border-bottom-width"));
 
     <% if t('html.dir') == "ltr" -%>
     $("#map").css("left", (sidebar_width) + "px");