[openstreetmap/openstreetmap-website] Add outlines for in-viewport changeset bboxes (PR #5964)
Anton Khorev
notifications at github.com
Fri May 2 15:21:49 UTC 2025
@AntonKhorev commented on this pull request.
> @@ -119,14 +119,12 @@ OSM.HistoryChangesetsLayer = L.FeatureGroup.extend({
const changeset = this._changesets.get(id);
if (!changeset) return;
- let highlightRect = this._highlightLayer.getLayer(id);
- if (!state && highlightRect) {
- this._highlightLayer.removeLayer(highlightRect);
- }
- if (state && !highlightRect) {
- highlightRect = L.rectangle(changeset.bounds, this._getHighlightStyle(changeset));
+ if (state) {
+ const highlightRect = L.rectangle(changeset.bounds, this._getHighlightStyle(changeset));
Overriding `getLayerId` to check if the layer is added by id is also not documented, but @jfirebaugh made it work both here a56d1036d58d45777d6adeffd5a950519bc70318 and in Leaflet https://github.com/Leaflet/Leaflet/pull/1581.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5964#discussion_r2071771384
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/5964/review/2812282536 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250502/c49fec2b/attachment-0001.htm>
More information about the rails-dev
mailing list