Closed opatut closed 2 years ago
As it was ui-only I rolled it out on https://obs.adfc-darmstadt.de for testing. The disappearing attribution brought up in #272 is now nice and visible again as it should be. The close button on the roads overlay for #275 works like a charm and I can't reproduce #274 with the new version. Regarding #276 the debouncing still may write a bunch of history entries a minute - maybe the easiest way to debounce for scrolling would be onMouseUp or similar if that event could be used to trigger the address bar rewrite? It seems that is what Google/Openstreetmap are at least listening to that event and for scrolling their url updates whenever one mouseups while dragging. Also it's unlikely that anyone is copying from the address bar while mouse-downing on the map. Nevertheless I see nothing broken about this merge request, so would suggest merging to fix #272 in a timely manner.
maybe the easiest way to debounce for scrolling would be onMouseUp or similar if that event could be used to trigger the address bar rewrite
Sadly, no, as other events also move the viewport, and you'd have to listen to all of them: clicking, double clicking, arrow keys?, scrolling, the navigation controls... It is easiest this way. Also, debounce means that if within 200ms there is another movement, it is ignored. It will not change the URL every 200ms while you're dragging, if that's what you thought. It will change the URL when you're not moving for 200ms. Most people will release the mouse when they stop dragging around anyway, and then click again to continue moving, if they so desire. I think it makes very little difference, you'll usually get one history entry per move either way.
Kudos, SonarCloud Quality Gate passed!
0 Bugs
0 Vulnerabilities
0 Security Hotspots
0 Code Smells
No Coverage information
0.0% Duplication