diff --git a/index.html b/index.html index f69c971c..9a7bc578 100644 --- a/index.html +++ b/index.html @@ -8232,7 +8232,7 @@ - @@ -8254,7 +8254,7 @@ - + @@ -8269,7 +8269,7 @@ - + @@ -8277,7 +8277,7 @@ - + diff --git a/main.js b/main.js index 5d67e029..1f91ed4a 100644 --- a/main.js +++ b/main.js @@ -293,11 +293,9 @@ async function checkLoadParameters() { // restore onloadBehavior from localStorage if saved const storedBehavior = localStorage.getItem("onloadBehavior"); - WARN && console.warn("Stored onloadBehavior:", storedBehavior); if (storedBehavior) { byId("onloadBehavior").value = storedBehavior; } - WARN && console.warn("Current onloadBehavior value:", byId("onloadBehavior").value); // check if there is a default map saved to indexedDB if (byId("onloadBehavior").value === "default") { diff --git a/modules/io/save.js b/modules/io/save.js index 5232bcf7..c4db90a2 100644 --- a/modules/io/save.js +++ b/modules/io/save.js @@ -177,7 +177,6 @@ async function saveAsDefaultMap() { await ldb.set("defaultMap", blob); localStorage.setItem("onloadBehavior", "default"); byId("onloadBehavior").value = "default"; - WARN && console.warn("Default map saved. onloadBehavior set to:", localStorage.getItem("onloadBehavior")); tip("Map is set as default and will open on load", true, "success", 5000); } catch (error) { ERROR && console.error(error); diff --git a/modules/ui/burg-editor.js b/modules/ui/burg-editor.js index 13e32850..cc331342 100644 --- a/modules/ui/burg-editor.js +++ b/modules/ui/burg-editor.js @@ -486,9 +486,17 @@ function editBurg(id) { } function editBurgLegend() { - const id = elSelected.attr("data-id"); - const name = elSelected.text(); - editNotes("burg" + id, name); + const id = +elSelected.attr("data-id"); + const burg = pack.burgs[id]; + + // Use Obsidian integration if available, otherwise fall back to old notes system + if (typeof editObsidianNote !== "undefined") { + const coordinates = {x: burg.x, y: burg.y}; + editObsidianNote(id, "burg", coordinates); + } else { + const name = elSelected.text(); + editNotes("burg" + id, name); + } } function showTemperatureGraph() { diff --git a/modules/ui/markers-editor.js b/modules/ui/markers-editor.js index 9f56db9a..30bdd90b 100644 --- a/modules/ui/markers-editor.js +++ b/modules/ui/markers-editor.js @@ -221,7 +221,14 @@ function editMarker(markerI) { function editMarkerLegend() { const id = element.id; - editNotes(id, id); + + // Use Obsidian integration if available, otherwise fall back to old notes system + if (typeof editObsidianNote !== "undefined" && marker) { + const coordinates = {x: marker.x, y: marker.y}; + editObsidianNote(marker.i, "marker", coordinates); + } else { + editNotes(id, id); + } } function toggleMarkerLock() {