diff options
author | Patrick Davison <snapwilliam@gmail.com> | 2013-03-12 22:46:55 -0700 |
---|---|---|
committer | Patrick Davison <snapwilliam@gmail.com> | 2013-03-12 22:46:55 -0700 |
commit | 96803882ec2a7677f9e92f1707636b589edca461 (patch) | |
tree | d7a01247ab5e0fa5b1050c50717f3985fa6ba7a8 /js/mapspecs.js | |
parent | 7d04d4f7e177365e711200e72d8211f474f7265e (diff) | |
download | pathery-96803882ec2a7677f9e92f1707636b589edca461.tar.xz |
Scoreboard dynamic map width.
Diffstat (limited to 'js/mapspecs.js')
-rw-r--r-- | js/mapspecs.js | 9 |
1 files changed, 2 insertions, 7 deletions
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);
|