<p></p>
<p><b>@hlfan</b> commented on this pull request.</p>
<hr>
<p>In <a href="https://github.com/openstreetmap/openstreetmap-website/pull/6235#discussion_r2233905196">app/assets/javascripts/index/search.js</a>:</p>
<pre style='color:#555'>> }
function showSearchResult() {
- let marker = $(this).data("marker");
-
- if (!marker) {
- const data = $(this).find("a.set_position").data();
-
- marker = L.marker([data.lat, data.lon], { icon: OSM.getMarker({}) });
-
- $(this).data("marker", marker);
- }
-
+ const index = processedResults++;
+ const listItem = $(this);
+ const color = `hwb(${(index * (Math.sqrt(5) - 1) * 180) % 360}deg 5% 5%)`;
</pre>
<p dir="auto">I found that the first colors, when rotating the other way, line up more with the other marker colors:</p>
<markdown-accessiblity-table><table role="table">
<thead>
<tr>
<th>+angle</th>
<th>-angle</th>
</tr>
</thead>
<tbody>
<tr>
<td><code class="notranslate">#0df250<span class="ml-1 d-inline-block border circle color-border-subtle" style="background-color: #0df250; height: 8px; width: 8px;"></span></code></td>
<td><code class="notranslate">#0d50f2<span class="ml-1 d-inline-block border circle color-border-subtle" style="background-color: #0d50f2; height: 8px; width: 8px;"></span></code></td>
</tr>
<tr>
<td><code class="notranslate">#930df2<span class="ml-1 d-inline-block border circle color-border-subtle" style="background-color: #930df2; height: 8px; width: 8px;"></span></code></td>
<td><code class="notranslate">#93f20d<span class="ml-1 d-inline-block border circle color-border-subtle" style="background-color: #93f20d; height: 8px; width: 8px;"></span></code></td>
</tr>
</tbody>
</table></markdown-accessiblity-table>
<p dir="auto">Yeah, pulling out that variable is a good idea.</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/6235#discussion_r2233905196">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLIJPS3IKSXFBX5NUND3KSTTHAVCNFSM6AAAAACCGRKE46VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZTANJZGQ2TQOJQGY">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLKG55VWEYI7ZQXTNAL3KSTTHA5CNFSM6AAAAACCGRKE46WGG33NNVSW45C7OR4XAZNRKB2WY3CSMVYXKZLTORJGK5TJMV32UY3PNVWWK3TUL5UWJTVWLORVU.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/6235/review/3059458906</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/6235#discussion_r2233905196",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/6235#discussion_r2233905196",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>