mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 17:51:24 +01:00
refactor: dynamically load modules
This commit is contained in:
parent
347083291f
commit
0c6eadaed3
21 changed files with 124 additions and 105 deletions
|
|
@ -68,7 +68,7 @@ function sortLines(headerElement) {
|
|||
applySorting(headers);
|
||||
}
|
||||
|
||||
function applySorting(headers) {
|
||||
export function applySorting(headers) {
|
||||
const header = headers.querySelector("div[class*='icon-sort']");
|
||||
if (!header) return;
|
||||
const sortby = header.dataset.sortby;
|
||||
|
|
@ -963,15 +963,6 @@ function selectIcon(initial, callback) {
|
|||
});
|
||||
}
|
||||
|
||||
function getAreaUnit(squareMark = "²") {
|
||||
return byId("areaUnit").value === "square" ? byId("distanceUnitInput").value + squareMark : byId("areaUnit").value;
|
||||
}
|
||||
|
||||
function getArea(rawArea) {
|
||||
const distanceScale = byId("distanceScaleInput")?.value;
|
||||
return rawArea * distanceScale ** 2;
|
||||
}
|
||||
|
||||
function confirmationDialog(options) {
|
||||
const {
|
||||
title = "Confirm action",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue