mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 09:41:24 +01:00
load fonts on style set change
This commit is contained in:
parent
cf269b775c
commit
99dd005e5c
5 changed files with 68 additions and 65 deletions
|
|
@ -879,10 +879,8 @@ function applyStyle(style) {
|
|||
|
||||
// change current style preset to another saved one
|
||||
function changeStylePreset(preset) {
|
||||
if (customization) {
|
||||
tip("Please exit the customization mode first", false, "error");
|
||||
return;
|
||||
}
|
||||
if (customization) return tip("Please exit the customization mode first", false, "error");
|
||||
|
||||
alertMessage.innerHTML = "Are you sure you want to change the style preset? All unsaved style changes will be lost";
|
||||
$("#alert").dialog({
|
||||
resizable: false,
|
||||
|
|
@ -899,6 +897,7 @@ function changeStylePreset(preset) {
|
|||
}
|
||||
} else if (defaultStyles[preset]) applyStyle(JSON.parse(defaultStyles[preset]));
|
||||
else applyDefaultStyle();
|
||||
loadUsedFonts();
|
||||
|
||||
removeStyleButton.style.display = stylePreset.selectedOptions[0].dataset.system ? "none" : "inline-block";
|
||||
updateElements(); // change elements
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue