From 054c81263351d02a3cea33339d850bb0ecfb363f Mon Sep 17 00:00:00 2001 From: BlueRaja Date: Fri, 8 Mar 2013 05:04:00 -0600 Subject: Fix width issue when displaying maps --- pages/scores.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'pages') 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 = $('
'); + var mapMargin = parseInt(fakeMapDom.css('margin-left')); + var targetWidth = $('.mapNavCon').width() - $('#scoreDisplay').width() - mapMargin; + displayMap(mapID, "mapDisplay", targetWidth); } function updateHash() { -- cgit v1.2.3