diff --git a/modules/io/load.js b/modules/io/load.js index fde69d42..8a6a9e1f 100644 --- a/modules/io/load.js +++ b/modules/io/load.js @@ -218,8 +218,7 @@ async function parseLoadedData(data) { if (settings[13]) urbanization = urbanizationInput.value = urbanizationOutput.value = settings[13]; if (settings[14]) mapSizeInput.value = mapSizeOutput.value = minmax(settings[14], 1, 100); if (settings[15]) latitudeInput.value = latitudeOutput.value = minmax(settings[15], 0, 100); - if (settings[16]) temperatureEquatorInput.value = temperatureEquatorOutput.value = settings[16]; - if (settings[17]) temperatureNorthPoleInput.value = temperatureNorthPoleOutput.value = settings[17]; //Not used see options: only for compatibility + // setting 16 and 17 (temperature) are moved to options if (settings[18]) precInput.value = precOutput.value = settings[18]; if (settings[19]) options = JSON.parse(settings[19]); if (settings[20]) mapName.value = settings[20]; @@ -231,6 +230,9 @@ async function parseLoadedData(data) { void (function applyOptionsToUI() { stateLabelsModeInput.value = options.stateLabelsMode; + yearInput.value = options.year; + eraInput.value = options.era; + shapeRendering.value = viewbox.attr("shape-rendering") || "geometricPrecision"; })(); void (function parseConfiguration() { @@ -586,13 +588,6 @@ async function parseLoadedData(data) { if (rulers && layerIsOn("toggleRulers")) rulers.draw(); if (layerIsOn("toggleGrid")) drawGrid(); - // set options - yearInput.value = options.year; - eraInput.value = options.era; - temperatureNorthPoleOutput.value = temperatureNorthPoleInput.value = options.temperatureNorthPole; - temperatureSouthPoleOutput.value = temperatureSouthPoleInput.value = options.temperatureSouthPole; - shapeRendering.value = viewbox.attr("shape-rendering") || "geometricPrecision"; - if (window.restoreDefaultEvents) restoreDefaultEvents(); focusOn(); // based on searchParams focus on point, cell or burg invokeActiveZooming(); diff --git a/modules/io/save.js b/modules/io/save.js index d471c0a2..f3e58147 100644 --- a/modules/io/save.js +++ b/modules/io/save.js @@ -24,8 +24,8 @@ function getMapData() { urbanization, mapSizeOutput.value, latitudeOutput.value, - temperatureEquatorOutput.value, - 0, //Dummy for tempNorthOutput.value + 0, // previously used for temperatureEquatorOutput.value + 0, // previously used for tempNorthOutput.value precOutput.value, JSON.stringify(options), mapName.value,