summaryrefslogtreecommitdiffstats
path: root/js
diff options
context:
space:
mode:
authorPatrick Davison <snapwilliam@gmail.com>2013-02-20 02:05:02 -0800
committerPatrick Davison <snapwilliam@gmail.com>2013-02-20 02:05:02 -0800
commit1c65a1a164008e993fba099723fc3039c2332a9c (patch)
treeaa7cb6077a13e1565b5d981e90c4174dde204485 /js
parentf7c3e79e2283cf1c3513e957a9eab6b14ff0331f (diff)
downloadpathery-1c65a1a164008e993fba099723fc3039c2332a9c.tar.xz
Restyled and fixed some bugs in the scoreboard.
Diffstat (limited to 'js')
-rw-r--r--js/mapspecs.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/js/mapspecs.js b/js/mapspecs.js
index 6bf7185..2a5bd1d 100644
--- a/js/mapspecs.js
+++ b/js/mapspecs.js
@@ -307,6 +307,7 @@ function request_path_done() {
}
function decryptJSON(text) {
+ if (typeof(text) == 'undefined') return false;
var JO;
if (typeof(JSON) == 'undefined') {
JO = !(/[^,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]/.test(text.replace(/"(\\.|[^"\\])*"/g, ''))) && eval('(' + text + ')');
@@ -772,6 +773,8 @@ function showTempSolution(mapid, tempSolution, moves, tempWallColor, tempWallEmb
//console.log('showTempSolution', mapid, solution, moves, tempWallColor, tempWallEmblem);
var savedSolution = '';
+ if (typeof tempSolution == 'undefined') tempSolution = '';
+
if (typeof solution[mapid] !== 'undefined') {
savedSolution = solution[mapid];
}
@@ -817,7 +820,6 @@ function displayMap(mapid, divID, goalSize, solution, moves, challengeMap) {
restoreSolution(mapid);
}
});
- console.log("dispMapExt");
}
//Map as object. If target width is NULL or False, default width is used.
@@ -829,7 +831,7 @@ function mapAsHTML(map, targetWidth, demo) {
//console.log("MapObj", map);
mapdata[map.ID] = map;
- //595
+ if ((map.width * 35) <= targetWidth) targetWidth = (map.width * 35);
if (!targetWidth) targetWidth = (map.width * 35);
var scale = map.width / targetWidth;
//alert(scale);