[openstreetmap/openstreetmap-website] Add outlines for in-viewport changeset bboxes (PR #5964)
Tom Hughes
notifications at github.com
Thu May 1 17:20:36 UTC 2025
@tomhughes 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));
So we're now relying on leaflet discard any pre-existing layer with the same ID when we add this one? Is that documented anywhere?
Or is the assumption just that we won't toggle a changeset on that is already on?
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5964#pullrequestreview-2810268701
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/5964/review/2810268701 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250501/e1fc58a4/attachment.htm>
More information about the rails-dev
mailing list