[openstreetmap/openstreetmap-website] "Scroll to changeset" context menu item (PR #6059)

Anton Khorev notifications at github.com
Wed May 28 00:00:10 UTC 2025


@AntonKhorev commented on this pull request.



> @@ -112,7 +116,10 @@ OSM.History = function (map) {
 
   function toggleChangesetHighlight(id, state) {
     changesetsLayer.toggleChangesetHighlight(id, state);
-    $("#changeset_" + id).toggleClass("selected", state);
+    $("#sidebar_content .changesets ol li").removeClass("selected");
+    if (state) {
+      $("#changeset_" + id).addClass("selected");
+    }

Highlights don't get stuck in the layer because everything is redrawn when changesets enter/leave the viewport during scrolling. But I changed it anyway to match the highlight logic in the sidebar. Now only one changeset can be highlighted. Previously it was possible to highlight several, but this wasn't used for anything.

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

Message ID: <openstreetmap/openstreetmap-website/pull/6059/review/2873099603 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250527/199f5749/attachment.htm>


More information about the rails-dev mailing list