From 96803882ec2a7677f9e92f1707636b589edca461 Mon Sep 17 00:00:00 2001 From: Patrick Davison Date: Tue, 12 Mar 2013 22:46:55 -0700 Subject: Scoreboard dynamic map width. --- js/mapspecs.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'js') 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 = $('
'); - var gridOuterPadding = parseInt(fakeGridDom.css('padding-left')) + parseInt(fakeGridDom.css('padding-right')); - targetWidth -= gridOuterPadding; - } var scale = map.width / targetWidth; //alert(scale); -- cgit v1.2.3