facebook / Rapid

The OpenStreetMap editor driven by open data, AI, and supercharged features
https://rapideditor.org
ISC License
517 stars 91 forks source link

In a densely mapped area, it's hard to pan the map #796

Open mvexel opened 1 year ago

mvexel commented 1 year ago

Description

Often you would accidentally drag a node instead. By the way, JOSM has a warning when you drag a node more than a certain distance. This has saved me from unintended bad edits multiple times.

Version

2.00-alpha.3.3

What browser are you seeing the problem on? What version are you running?

Chrome v109.0

Steps to reproduce

No response

The browser URL at the time you encountered the bug

https://mapwith.ai/rapid-v2-alpha3#background=Bing&datasets=fbRoads,msBuildings&disable_features=boundaries&map=17.16/50.73303/7.09840

bhousel commented 1 year ago

Yeah this is something I've wanted to improve for years, and every time it makes editing harder. 😭

I know this isn't a perfect solution but - you can do 2-finger panning on a Mac trackpad to pan the map around. (Browsers convert this gesture to a wheel event which we can respond to).

Most Mac users have been conditioned to pan this way, but it's not universal, and also people switching from JOSM probably wouldn't know to try it.

This is frustrating too because I really thought we were training users about "2 finger panning" in the intro walkthrough, but I just checked and it is not mentioned. 😢

mvexel commented 1 year ago

In JOSM you pan the map by holding RMB and moving the cursor around. I find this works well for mouse users like me. 2-finger panning on trackpad works in JOSM as well (but you have to "click" as well, not sure if that is because of a system gesture setting)

bhousel commented 1 year ago

In 3ac0bbe14 I just made a change so that now if you drag while holding the right mouse button, it will only pan the map, not drag nodes. I think this matches how JOSM works?

I'm going to leave the issue open for now - want to try it for a while and see if this feels better.

bhousel commented 1 year ago

BTW there is still an issue where if the user is dragging the map with the right mouse button and releases it out of the window, we never get the pointerup and the map keeps dragging. I don't know why - performing map drags with the left mouse button doesn't seem to have this issue.

mvexel commented 1 year ago

In 3ac0bbe I just made a change so that now if you drag while holding the right mouse button, it will only pan the map, not drag nodes. I think this matches how JOSM works?

That does sound like the JOSM behavior, yes.