[openstreetmap/openstreetmap-website] don't re-pan the map when selecting another note that is already on screen (PR #5686)

Martin Raifer notifications at github.com
Sun Feb 16 09:58:24 UTC 2025


Fixes #5683 (a regression in #5679): the problem was that when clicking on a new note on the map, the URL hash with the `map` parameter is cleared somewhere before  `pushstate` gets called, resulting in the map to be panned in `map.addObject` during the `initialize` step. It's now solved by passing an additional parameter to `initialize` and only do the map centering there.

This also allowed to fix #648 via 3a016a5f1.
You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/openstreetmap-website/pull/5686

-- Commit Summary --

  * don't re-pan the map when selecting another note that is already on the screen
  * don't pan map wen closing/reopening/commenting a note, fixes #648

-- File Changes --

    M app/assets/javascripts/index/note.js (15)

-- Patch Links --

https://github.com/openstreetmap/openstreetmap-website/pull/5686.patch
https://github.com/openstreetmap/openstreetmap-website/pull/5686.diff

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

Message ID: <openstreetmap/openstreetmap-website/pull/5686 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250216/32d4983a/attachment.htm>


More information about the rails-dev mailing list