From b3f83bbabdec5c9957080b87cf657cac37d815ca Mon Sep 17 00:00:00 2001 From: Azgaar Date: Mon, 18 May 2020 00:50:57 +0300 Subject: [PATCH] v1.4.18 --- index.css | 2 +- index.html | 2 +- main.js | 3 ++- modules/ui/states-editor.js | 6 +++--- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/index.css b/index.css index 0fce363c..5308deed 100644 --- a/index.css +++ b/index.css @@ -114,7 +114,7 @@ button, select, a, .pointer { fill-rule: evenodd; } -#oceanLayers { +#oceanLayers, #terrs { fill-rule: evenodd; } diff --git a/index.html b/index.html index 02f547f0..c3efcd13 100644 --- a/index.html +++ b/index.html @@ -2870,7 +2870,7 @@ - + diff --git a/main.js b/main.js index a2b40674..1e44a558 100644 --- a/main.js +++ b/main.js @@ -343,7 +343,8 @@ function showWelcomeMessage() { diff --git a/modules/ui/states-editor.js b/modules/ui/states-editor.js index 2f1d5800..de0da9e9 100644 --- a/modules/ui/states-editor.js +++ b/modules/ui/states-editor.js @@ -215,8 +215,7 @@ function editStates() { } function editStateName(state) { - - //Reset input value and close add mode + // reset input value and close add mode stateNameEditorCustomForm.value = ""; const addModeActive = stateNameEditorCustomForm.style.display === "inline-block"; if (addModeActive) { @@ -244,6 +243,7 @@ function editStates() { document.getElementById("stateNameEditorShortCulture").addEventListener("click", regenerateShortNameCuture); document.getElementById("stateNameEditorShortRandom").addEventListener("click", regenerateShortNameRandom); document.getElementById("stateNameEditorAddForm").addEventListener("click", addCustomForm); + document.getElementById("stateNameEditorCustomForm").addEventListener("change", addCustomForm); document.getElementById("stateNameEditorFullRegenerate").addEventListener("click", regenerateFullName); function regenerateShortNameCuture() { @@ -264,7 +264,7 @@ function editStates() { const addModeActive = stateNameEditorCustomForm.style.display === "inline-block"; stateNameEditorCustomForm.style.display = addModeActive ? "none" : "inline-block"; stateNameEditorSelectForm.style.display = addModeActive ? "inline-block" : "none"; - if (addModeActive) applyOption(stateNameEditorSelectForm, value); + if (value && addModeActive) applyOption(stateNameEditorSelectForm, value); stateNameEditorCustomForm.value = ""; }