mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 17:51:24 +01:00
refactor(es modules): move all files to src, try vite 3.0
This commit is contained in:
parent
4feed39d5c
commit
0d05e1b250
119 changed files with 8218 additions and 139 deletions
|
|
@ -1,8 +1,8 @@
|
|||
import {dragLegendBox} from "../modules/legend";
|
||||
import {findCell, findGridCell} from "../utils/graphUtils";
|
||||
import {tip, showMainTip} from "./tooltips";
|
||||
import {si, convertTemperature} from "/src/utils/unitUtils";
|
||||
import {debounce} from "/src/utils/functionUtils";
|
||||
import {si, convertTemperature} from "../utils/unitUtils";
|
||||
import {debounce} from "../utils/functionUtils";
|
||||
|
||||
export function restoreDefaultEvents() {
|
||||
Zoom.setZoomBehavior();
|
||||
|
|
@ -51,7 +51,7 @@ function handleMouseMove() {
|
|||
}
|
||||
|
||||
// show note box on hover (if any)
|
||||
function showNotes(event: Event) {
|
||||
function showNotes(event) {
|
||||
if (notesEditor?.offsetParent) return;
|
||||
let id = event.target.id || event.target.parentNode.id || event.target.parentNode.parentNode.id;
|
||||
if (event.target.parentNode.parentNode.id === "burgLabels") id = "burg" + event.target.dataset.id;
|
||||
|
|
@ -70,7 +70,7 @@ function showNotes(event: Event) {
|
|||
}
|
||||
|
||||
// show viewbox tooltip if main tooltip is blank
|
||||
function showMapTooltip(point: number[], event: Event, packCellId: number, gridCellId: number) {
|
||||
function showMapTooltip(point, event, packCellId, gridCellId) {
|
||||
tip(""); // clear tip
|
||||
const path = event.composedPath();
|
||||
if (!path[path.length - 8]) return;
|
||||
|
|
@ -23,7 +23,8 @@ function addInstallationPrompt() {
|
|||
"beforeinstallprompt",
|
||||
async event => {
|
||||
event.preventDefault();
|
||||
const Installation = await import("../../modules/dynamic/installation.js");
|
||||
// @ts-ignore
|
||||
const Installation = await import("../modules/dynamic/installation.js");
|
||||
Installation.init(event);
|
||||
},
|
||||
{once: true}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import {ERROR} from "/src/config/logging";
|
||||
import {ERROR} from "../config/logging";
|
||||
|
||||
// prompt replacer (prompt does not work in Electron)
|
||||
const $prompt: HTMLElement = document.getElementById("prompt")!;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue