[openstreetmap/openstreetmap-website] Install add/remove event listeners directly on note layer (PR #5500)
Anton Khorev
notifications at github.com
Tue Jan 14 23:14:01 UTC 2025
https://github.com/openstreetmap/openstreetmap-website/commit/de78176e04961c52f1fa1283812ec06ce6eb90cf added `layeradd`/`layerremove` listeners on `map` that check the layer and only do something if it's `noteLayer`. Later https://github.com/openstreetmap/openstreetmap-website/commit/85282f5cdd5b37016027feda0a16d8cbdc6a2581 added `click` listener directly on `noteLayer`. But `layeradd`/`layerremove` could also be installed directly on `noteLayer`, then comparing the layers wouldn't be necessary.
Elsewhere the same thing is considered for data layer: https://github.com/openstreetmap/openstreetmap-website/pull/5474#issuecomment-2584926028
You can view, comment on, or merge this pull request online at:
https://github.com/openstreetmap/openstreetmap-website/pull/5500
-- Commit Summary --
* Install add/remove event listeners directly on note layer
-- File Changes --
M app/assets/javascripts/index/layers/notes.js (22)
-- Patch Links --
https://github.com/openstreetmap/openstreetmap-website/pull/5500.patch
https://github.com/openstreetmap/openstreetmap-website/pull/5500.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5500
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/5500 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250114/8618958f/attachment-0001.htm>
More information about the rails-dev
mailing list