mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 17:51:24 +01:00
fix(obsidian): pass string elementId instead of number to editObsidianNote
The editObsidianNote function expects elementId as a string (e.g. 'burg123') but was receiving a number. This caused elementId.replace() to fail. Fixed in both: - burg-editor.js: Pass 'burg' + id instead of id - markers-editor.js: Pass id (already a string) instead of marker.i
This commit is contained in:
parent
619bea1b99
commit
9243c43d2d
3 changed files with 4 additions and 4 deletions
|
|
@ -492,7 +492,7 @@ function editBurg(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);
|
||||
editObsidianNote("burg" + id, "burg", coordinates);
|
||||
} else {
|
||||
const name = elSelected.text();
|
||||
editNotes("burg" + id, name);
|
||||
|
|
|
|||
|
|
@ -225,7 +225,7 @@ function editMarker(markerI) {
|
|||
// 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);
|
||||
editObsidianNote(id, "marker", coordinates);
|
||||
} else {
|
||||
editNotes(id, id);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue