mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-18 02:01:22 +01:00
v1.3.3
This commit is contained in:
parent
79e9a12d99
commit
aab1b8eac6
12 changed files with 152 additions and 109 deletions
|
|
@ -41,8 +41,13 @@ function editUnits() {
|
|||
|
||||
function changeDistanceUnit() {
|
||||
if (this.value === "custom_name") {
|
||||
const custom = prompt("Provide a custom name for distance unit");
|
||||
if (custom) this.options.add(new Option(custom, custom, false, true));
|
||||
prompt("Provide a custom name for a distance unit", {default:""}, custom => {
|
||||
this.options.add(new Option(custom, custom, false, true));
|
||||
lock("distanceUnit");
|
||||
drawScaleBar();
|
||||
calculateFriendlyGridSize();
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
lock("distanceUnit");
|
||||
|
|
@ -69,9 +74,11 @@ function editUnits() {
|
|||
|
||||
function changeHeightUnit() {
|
||||
if (this.value === "custom_name") {
|
||||
const custom = prompt("Provide a custom name for height unit");
|
||||
if (custom) this.options.add(new Option(custom, custom, false, true));
|
||||
else this.value = "ft";
|
||||
prompt("Provide a custom name for a height unit", {default:""}, custom => {
|
||||
this.options.add(new Option(custom, custom, false, true));
|
||||
lock("heightUnit");
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
lock("heightUnit");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue