<p></p>
<p><b>@AntonKhorev</b> commented on this pull request.</p>
<hr>
<p>In <a href="https://github.com/openstreetmap/openstreetmap-website/pull/5964#discussion_r2071771384">app/assets/javascripts/index/history-changesets-layer.js</a>:</p>
<pre style='color:#555'>> @@ -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));
</pre>
<p dir="auto">Overriding <code class="notranslate">getLayerId</code> to check if the layer is added by id is also not documented, but <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/jfirebaugh/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/jfirebaugh">@jfirebaugh</a> made it work both here <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/openstreetmap/openstreetmap-website/commit/a56d1036d58d45777d6adeffd5a950519bc70318/hovercard" href="https://github.com/openstreetmap/openstreetmap-website/commit/a56d1036d58d45777d6adeffd5a950519bc70318"><tt>a56d103</tt></a> and in Leaflet <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="13027964" data-permission-text="Title is private" data-url="https://github.com/Leaflet/Leaflet/issues/1581" data-hovercard-type="pull_request" data-hovercard-url="/Leaflet/Leaflet/pull/1581/hovercard" href="https://github.com/Leaflet/Leaflet/pull/1581">Leaflet/Leaflet#1581</a>.</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/5964#discussion_r2071771384">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLPO6U72MMHLO6DL5HD24OEQ3AVCNFSM6AAAAAB4DO6UY6VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDQMJSGI4DENJTGY">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLOM3F7W7YDCUMG5QH324OEQ3A5CNFSM6AAAAAB4DO6UY6WGG33NNVSW45C7OR4XAZNRKB2WY3CSMVYXKZLTORJGK5TJMV32UY3PNVWWK3TUL5UWJTVHUADKQ.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/openstreetmap-website/pull/5964/review/2812282536</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/5964#discussion_r2071771384",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/5964#discussion_r2071771384",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>