diff options
Diffstat (limited to 'js/mapspecs.js')
-rw-r--r-- | js/mapspecs.js | 6 |
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);
|