[openstreetmap/openstreetmap-website] Fix outputting route before directions sidebar is loaded (PR #5961)

Anton Khorev notifications at github.com
Mon Apr 28 21:59:56 UTC 2025


@AntonKhorev commented on this pull request.



>  
-      map.setSidebarOverlaid(!endpoints[0].latlng || !endpoints[1].latlng);
-    }
+    map.setSidebarOverlaid(!endpoints[0].latlng || !endpoints[1].latlng);

Yes, it's still needed.

1. Reload the map view to make sure that the directions sidebar is not loaded.
2. Open the context menu.
3. Pick *Directions from here*.
4. If you removed `map.setSidebarOverlaid` from `page.pushstate` / `page.popstate`, you'll see an empty *Directions* sidebar under the directions form. Normally it doesn't appear until two endopints are picked.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5961#discussion_r2064856924
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/5961/review/2801093585 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250428/da06ccf8/attachment.htm>


More information about the rails-dev mailing list