[openstreetmap/openstreetmap-website] Use baselayerchange/overlaylayerchange instead of layeradd/layerremove (PR #5474)

Roman Deev notifications at github.com
Fri Jan 10 23:56:20 UTC 2025


@deevroman commented on this pull request.



> @@ -124,7 +124,7 @@ L.OSM.layers = function (options) {
           map.fire("overlaylayerchange", { layer: layer });
         });
 
-        map.on("layeradd layerremove", function () {
+        map.on("baselayerchange overlaylayerchange", function () {

although, I was in a hurry to replace this handler. This breaks the initial filling of checkboxes.

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

Message ID: <openstreetmap/openstreetmap-website/pull/5474/review/2544345763 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250110/04153e79/attachment.htm>


More information about the rails-dev mailing list