diff --git a/index.css b/index.css index 72c73f88..159384f5 100644 --- a/index.css +++ b/index.css @@ -1328,7 +1328,7 @@ div.states > div.biomeArea { #pickerLabel { fill: #f8ffff; - font-size: 1.2em; + font-size: 12px; font-weight: bold; font-family: Arial, Helvetica, sans-serif; cursor: move !important; @@ -1366,7 +1366,7 @@ div.states > div.biomeArea { #pickerSpaces input { height: 8px; width: 16px; - font-size: smaller; + font-size: 9px; text-align: center; -moz-appearance: textfield; } diff --git a/main.js b/main.js index c722af9b..dcb443f0 100644 --- a/main.js +++ b/main.js @@ -190,7 +190,7 @@ function showUploadErrorMessage(error, URL, random) { Cannot load map from the link provided. ${random?`A new random map is generated. `:''} Please ensure the linked file is reachable and CORS is allowed on server side`; - $("#alert").dialog({title: "Loading error", width: 320, buttons: {OK: function() {$(this).dialog("close");}}}); + $("#alert").dialog({title: "Loading error", width: "32em", buttons: {OK: function() {$(this).dialog("close");}}}); } function generateMapOnLoad() { @@ -437,7 +437,7 @@ function showWelcomeMessage() {

Thanks for all supporters on Patreon!

`; $("#alert").dialog( - {resizable: false, title: "Fantasy Map Generator update", width: 310, + {resizable: false, title: "Fantasy Map Generator update", width: "31em", buttons: {OK: function() {$(this).dialog("close")}}, position: {my: "center", at: "center", of: "svg"}, close: () => localStorage.setItem("version", version)} @@ -554,7 +554,7 @@ void function addDragToUpload() { alertMessage.innerHTML = 'Please upload a .map file you have previously downloaded'; $("#alert").dialog({ resizable: false, title: "Invalid file format", - width: 400, buttons: { + width: "40em", buttons: { Close: function() { $(this).dialog("close"); } }, position: {my: "center", at: "center", of: "svg"} }); @@ -618,7 +618,7 @@ function generate() {
If error is critical, clear the stored data and try again.

${parseError(error)}

`; $("#alert").dialog({ - resizable: false, title: "Generation error", width:320, buttons: { + resizable: false, title: "Generation error", width:"32em", buttons: { "Clear data": function() {localStorage.clear(); localStorage.setItem("version", version);}, Regenerate: function() {regenerateMap(); $(this).dialog("close");}, Ignore: function() {$(this).dialog("close");} diff --git a/modules/save-and-load.js b/modules/save-and-load.js index 41766ebb..6b4c66c6 100644 --- a/modules/save-and-load.js +++ b/modules/save-and-load.js @@ -230,7 +230,7 @@ function saveGeoJSON() { alertMessage.innerHTML = `You can export map data in GeoJSON format used in GIS tools such as QGIS. Check out wiki-page for guidance`; - $("#alert").dialog({title: "GIS data export", resizable: false, width: 320, position: {my: "center", at: "center", of: "svg"}, + $("#alert").dialog({title: "GIS data export", resizable: false, width: "32em", position: {my: "center", at: "center", of: "svg"}, buttons: { Cells: saveGeoJSON_Cells, Routes: saveGeoJSON_Roads, @@ -391,7 +391,7 @@ function uploadFile(file, callback) {
The map will be auto-updated. In case of issues please keep using an ${archive} of the Generator`; } alertMessage.innerHTML = message; - $("#alert").dialog({title: "Version conflict", width: 380, buttons: { + $("#alert").dialog({title: "Version conflict", width: "38em", buttons: { OK: function() {$(this).dialog("close"); if (load) parseLoadedData(data);} }}); }; @@ -715,7 +715,7 @@ function parseLoadedData(data) {
generate a new random map or cancel the loading

${parseError(error)}

`; $("#alert").dialog({ - resizable: false, title: "Loading error", maxWidth:500, buttons: { + resizable: false, title: "Loading error", maxWidth:"50em", buttons: { "Select file": function() {$(this).dialog("close"); mapToLoad.click();}, "New map": function() {$(this).dialog("close"); regenerateMap();}, Cancel: function() {$(this).dialog("close")} diff --git a/modules/ui/options.js b/modules/ui/options.js index 99aa7116..032b7f86 100644 --- a/modules/ui/options.js +++ b/modules/ui/options.js @@ -862,7 +862,7 @@ function applyStoredOptions() { if (localStorage.getItem("regions")) changeStatesNumber(localStorage.getItem("regions")); if (localStorage.getItem("uiSize")) changeUIsize(localStorage.getItem("uiSize")); - else changeUIsize(Math.max(Math.min(rn(mapWidthInput.value / 1024, 1), 3), 1)); + else changeUIsize(Math.max(Math.min(rn(mapWidthInput.value / 1230, 1), 3), 1)); } // randomize options if randomization is allowed (not locked)