[openstreetmap/openstreetmap-website] Add enable/disable endpoint methods (PR #5095)

Anton Khorev notifications at github.com
Mon Aug 19 16:37:31 UTC 2024


Part of #5064. I'm pulling it out because it's also required for #4900.

The noticeable difference after this PR should be geocoding request cancelling when leaving the directions page. Previously you could pick "Directions from/to here" then quickly close the directions form or go to any other map layout page. The geocoding request could terminate after that, placing an endpoint marker on the map despite not being on the directions page.
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * Install endpoint listeners using enable/disable methods
  * Remove endpoint markers in disable method
  * Replace geocode request boolean property with request object

-- File Changes --

    M app/assets/javascripts/index/directions-endpoint.js (35)
    M app/assets/javascripts/index/directions.js (10)

-- Patch Links --

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

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

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


More information about the rails-dev mailing list