[openstreetmap/openstreetmap-website] Use map tiles dark mode from leaflet-osm plugin (PR #5426)
Tom Hughes
notifications at github.com
Mon Dec 30 12:54:09 UTC 2024
@tomhughes commented on this pull request.
> @@ -31,6 +31,9 @@ L.OSM.layers = function (options) {
var miniMap = L.map(mapContainer[0], { attributionControl: false, zoomControl: false, keyboard: false })
.addLayer(new layer.constructor(layer.options));
+ if (layer.options.schemeClass) miniMap.getPane("tilePane").classList.add(layer.options.schemeClass);
+ miniMap.getPane("tilePane").style.setProperty("--dark-mode-map-filter", layer.options.filter || "none");
I only mentioned the `dark` class because you're already applying it, though as far as I know it does nothing currently? I don't care too much about exactly what you call the class but I do want to make the filtering decision dependent on a class rather than on dynamically editing the style.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5426#discussion_r1899525274
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/5426/review/2525554669 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20241230/e10a51e5/attachment.htm>
More information about the rails-dev
mailing list