summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--css/stats.css2
-rw-r--r--js/mapspecs.js9
-rw-r--r--pages/scores.php5
3 files changed, 4 insertions, 12 deletions
diff --git a/css/stats.css b/css/stats.css
index 28d190a..bfb9571 100644
--- a/css/stats.css
+++ b/css/stats.css
@@ -97,7 +97,7 @@
.scoreCol {
min-height:500px;
- min-width:277px;
+ min-width:325px;
float:left;
}
.mapCol {
diff --git a/js/mapspecs.js b/js/mapspecs.js
index 688c9dc..dbb1c60 100644
--- a/js/mapspecs.js
+++ b/js/mapspecs.js
@@ -852,17 +852,12 @@ function mapAsHTML(map, targetWidth, mapEditor) {
//console.log("MapObj", map);
mapdata[map.ID] = map;
+ //Map bigger than target width?
if (!targetWidth || (map.width * 35) <= targetWidth)
{
+ //Use standard size.
targetWidth = (map.width * 35);
}
- else
- {
- //Need to take into account padding of .grid_outer
- var fakeGridDom = $('<div class="grid_outer"></div>');
- var gridOuterPadding = parseInt(fakeGridDom.css('padding-left')) + parseInt(fakeGridDom.css('padding-right'));
- targetWidth -= gridOuterPadding;
- }
var scale = map.width / targetWidth;
//alert(scale);
diff --git a/pages/scores.php b/pages/scores.php
index 3f252ec..fc86b4f 100644
--- a/pages/scores.php
+++ b/pages/scores.php
@@ -118,10 +118,7 @@ function displayMapScores(mapID) {
scoresShowPage(pointerPage, mapID);
- //Create a fake DOM element to determine the margin-left of the map, to get the target width
- var fakeMapDom = $('<div class="mapCol"></div>');
- var mapMargin = parseInt(fakeMapDom.css('margin-left'));
- var targetWidth = $('.mapNavCon').width() - $('#scoreDisplay').width() - mapMargin;
+ targetWidth = parseInt($('.wrapper').css("width")) - parseInt($('.scoreCol').css("width"));
displayMap(mapID, "mapDisplay", targetWidth);
}