esm7 / obsidian-map-view

Interactive map view for Obsidian.md
MIT License
546 stars 25 forks source link

Moving Markers on Map Doesn't Work #236

Open rchaklashiya opened 3 months ago

rchaklashiya commented 3 months ago

Problem: I am attempting to move markers on map view. However, they do not move even though the correct option is selected and I try to drag the marker.

Expected behavior: The marker moves when I try to drag it using the "enable move" feature.

Steps to Reproduce:

  1. Open the map view
  2. Right click on a marker and select from the dropdown "enable move"
  3. The marker will turn blue with a white "plus arrow" sign, indicating that it can move.
  4. I attempt to drag it to another location on the map, but it doesn't move. The mouse cursor does turn into a "grab hand" cursor, however, even as nothing happens when I click on the marker, hold the mouse, and try to drag it.

Other weird behavior that happens when I try the "enable move":

  1. When I click "disable move" the marker does not return to its original appearance, and remains blue with the white "plus arrow" sign on it. This effect resets if I close the map and reopen the map.
  2. The mouse is stuck as a "drag" cursor, and cannot drag anything (including the map itself--the map can no longer be dragged to move around, instead arrow keys need to be used to do so). This effect appears to remain unless I reload the plugin or reload Obsidian.

Map View Version: 5.0.2 Obsidian version: 1.5.8 Computer: Windows 11

esm7 commented 3 months ago

That's odd, two more details that would help:

  1. How does your note and the location you are trying to move constructed? Is it a front matter location or an inline location? In both cases, would you mind sharing how it's defined (the full location key in the case of front matter, the full line in the case of inline)?
  2. Can you check in the Obsidian Developer Console (Ctrl+Shift+I) if any errors are shown from the moment you click "enable move" until after you try to drag the marker?
rchaklashiya commented 3 months ago

The weirdest thing happened--I'm trying again today and now it is able to move seemlessly! So the issue is resolved on my end atm, though I don't know if it will happen again. The only difference between today and yesterday in usage is that I've restarted my computer between then, maybe that did something. It's possible it's due to obsidian restart, I'm realizing now I had not tried that. In any case I will still answer your questions:

  1. The location I'm trying to move is in the frontmatter, here's a snippet of how the location key is defined: location: 34.412636559810664,-119.84846976206549
  2. Now that it is working for me again, when I try to move it the developer console is not showing any errors. I'm not sure if it was showing errors when it wasn't working. It's just giving this updateProgressBarInElement: image
esm7 commented 3 months ago

If the issue recreates at some point, I'd love to get these details in real-time :pray:

rchaklashiya commented 3 months ago

Yes if it happens again I'll let you know!