summaryrefslogtreecommitdiffstats
path: root/pages/scores.php
diff options
context:
space:
mode:
authorBlueRaja <BlueRaja.admin@gmail.com>2013-03-08 05:04:00 -0600
committerBlueRaja <BlueRaja.admin@gmail.com>2013-03-08 05:04:00 -0600
commit054c81263351d02a3cea33339d850bb0ecfb363f (patch)
tree9e52ee53e7c8979ecb4148f61497505111c51343 /pages/scores.php
parent312c4362e9deed7ed7573e17312c1669cc5e9e65 (diff)
downloadpathery-054c81263351d02a3cea33339d850bb0ecfb363f.tar.xz
Fix width issue when displaying maps
Diffstat (limited to 'pages/scores.php')
-rw-r--r--pages/scores.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/pages/scores.php b/pages/scores.php
index 60ce2e8..4154fea 100644
--- a/pages/scores.php
+++ b/pages/scores.php
@@ -114,8 +114,14 @@ function displayMapScores(mapID) {
$('#currentlyRunningMessage').toggle(showCurrentMapMessage);
$("#mapDisplay").fadeOut('fast');
- displayMap(mapID, "mapDisplay", 682);
+
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;
+ displayMap(mapID, "mapDisplay", targetWidth);
}
function updateHash() {