javalent / obsidian-leaflet

Adds interactive maps to Obsidian.md using Leaflet.js
467 stars 26 forks source link

Marker Names Don’t Update When Linked .md File’s Name Updates #411

Open candyapplecorn opened 11 months ago

candyapplecorn commented 11 months ago

Check for existing bug reports before submitting.

Expected Behavior

When the user changes the name of a mark down file in the Obsidian vault, if that mark down file is used in a marker, then the name of the file in the marker should update to the new name of the file.

Current behaviour

When the user puts a file into a marker, and then changes the name of the file by opening the file, and changing its name at the top of the file, then, when the user goes back to the map, and looks at the marker, the marker will still be for the original file name, and not the updated file name.

Reproduction

  1. In obsidian, with leaflet, add a marker to a map.
  2. Give the marker a markdown file in the vault
  3. Open that file
  4. Change its name
  5. Go back to the map
  6. Look at the marker; it still has the original file name
  7. Click the marker
  8. Notice you’re now in an empty file with the original file name

Which Operating Systems are you using?

Obsidian Version Check

1.4.6 (105) / API v1.3.5

Plugin Version

5.7.2

Confirmation

Possible solution

Use the events API to subscribe to the file name change event:

https://wanadev.github.io/obsidianjs/obsidian/events.html

Reitsam commented 1 month ago

(Sry I'm not familiar to github customs, so I may not adhere to etiquette)

I'm having the same problem on my laptop. (I yet have to check by disabling all other plugins though) But as this is listed as a bug here, I'm hopeful, since that issue makes my thought-after organization so much more troublesome.

Edit: I disabled all other Plugins aswell, and the problem sadly still persisted. This and the messed up suggestion UI while mark-linking to another Note kinda hold this plugin back quite a bit.