refactor: dynamically load modules

This commit is contained in:
Azgaar 2022-07-08 23:54:08 +03:00
parent 347083291f
commit 0c6eadaed3
21 changed files with 124 additions and 105 deletions

View file

@ -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",