javalent / obsidian-leaflet

Adds interactive maps to Obsidian.md using Leaflet.js
508 stars 30 forks source link

FR: Hover over markers to open Page Preview #287

Closed HEmile closed 2 years ago

HEmile commented 2 years ago

With the new Obsidian Hover Editor plugin, the page preview when hovering over a link has become much more useful. This could be a very nice (and easy to implement!) feature for Leaflet! (NB: I also have this issue in the Map View repo, I think it makes sense in both plugins.)

For example, when holding cmd/ctrl down and hovering over a note for eg 200 ms, you can trigger the link-hover event like this: this.plugin.app.workspace.trigger('link-hover', this.element, null, file.path, '')

valentine195 commented 2 years ago

Sorry, forgot to respond to this. This has been implemented in the plugin from the beginning (see here). You do have to enable it in Leaflet settings though.