<p dir="auto"><a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/openstreetmap/openstreetmap-website/commit/de78176e04961c52f1fa1283812ec06ce6eb90cf/hovercard" href="https://github.com/openstreetmap/openstreetmap-website/commit/de78176e04961c52f1fa1283812ec06ce6eb90cf"><tt>de78176</tt></a> added <code class="notranslate">layeradd</code>/<code class="notranslate">layerremove</code> listeners on <code class="notranslate">map</code> that check the layer and only do something if it's <code class="notranslate">noteLayer</code>. Later <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/openstreetmap/openstreetmap-website/commit/85282f5cdd5b37016027feda0a16d8cbdc6a2581/hovercard" href="https://github.com/openstreetmap/openstreetmap-website/commit/85282f5cdd5b37016027feda0a16d8cbdc6a2581"><tt>85282f5</tt></a> added <code class="notranslate">click</code> listener directly on <code class="notranslate">noteLayer</code>. But <code class="notranslate">layeradd</code>/<code class="notranslate">layerremove</code> could also be installed directly on <code class="notranslate">noteLayer</code>, then comparing the layers wouldn't be necessary.</p>
<p dir="auto">Elsewhere the same thing is considered for data layer: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2770637460" data-permission-text="Title is private" data-url="https://github.com/openstreetmap/openstreetmap-website/issues/5474" data-hovercard-type="pull_request" data-hovercard-url="/openstreetmap/openstreetmap-website/pull/5474/hovercard?comment_id=2584926028&comment_type=issue_comment" href="https://github.com/openstreetmap/openstreetmap-website/pull/5474#issuecomment-2584926028">#5474 (comment)</a></p>
<hr>
<h4>You can view, comment on, or merge this pull request online at:</h4>
<p> <a href='https://github.com/openstreetmap/openstreetmap-website/pull/5500'>https://github.com/openstreetmap/openstreetmap-website/pull/5500</a></p>
<h4>Commit Summary</h4>
<ul>
<li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/5500/commits/9d7e59784fe12856052ba8ca91b4a2400f83b11f" class="commit-link">9d7e597</a> Install add/remove event listeners directly on note layer</li>
</ul>
<h4 style="display: inline-block">File Changes </h4> <p style="display: inline-block">(<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5500/files">1 file</a>)</p>
<ul>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5500/files#diff-8058f2f9c608b200098c52a855b78588f6b3aedce1b96c0fa57b706fa2d9e81c">app/assets/javascripts/index/layers/notes.js</a>
(22)
</li>
</ul>
<h4>Patch Links:</h4>
<ul>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/5500.patch'>https://github.com/openstreetmap/openstreetmap-website/pull/5500.patch</a></li>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/5500.diff'>https://github.com/openstreetmap/openstreetmap-website/pull/5500.diff</a></li>
</ul>
<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/5500">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLJBA2BSWGYIALR7GY32KWK3TAVCNFSM6AAAAABVF633O6VHI2DSMVQWIX3LMV43ASLTON2WKOZSG44DQNBVGQ4DMMA">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLLWIMWRNFLADFMCW5L2KWK3TA5CNFSM6AAAAABVF633O6WGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHKMNDRZQ.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/5500</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/5500",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/5500",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>