diff options
Diffstat (limited to 'src/components')
| -rw-r--r-- | src/components/LocationsMap.svelte | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/src/components/LocationsMap.svelte b/src/components/LocationsMap.svelte index a06c993b..6f84408e 100644 --- a/src/components/LocationsMap.svelte +++ b/src/components/LocationsMap.svelte @@ -126,8 +126,16 @@ } inview = inview.sort((a, b) => a.tags.name.localeCompare(b.tags.name)); + shuffleArray(inview); } +function shuffleArray(array) { + for (let i = array.length - 1; i > 0; i--) { + const j = Math.floor(Math.random() * (i + 1)); + [array[i], array[j]] = [array[j], array[i]]; + } +} + let popups = {}; let counter = 0; @@ -231,16 +239,16 @@ </div> </div> - <div class="hidden lg:grid grid-cols-3 justify-items-center"> - {#each inview as m} - <button - on:click={() => select(m)} - class="text-left" - class:font-bold={m.id === inview[currentIndex]?.id} - id={`marker-${m.id}`}>{m.tags.name}</button - > - {/each} - </div> + <!-- <div class="hidden lg:grid grid-cols-3 justify-items-center"> --> + <!-- {#each inview as m} --> + <!-- <button --> + <!-- on:click={() => select(m)} --> + <!-- class="text-left" --> + <!-- class:font-bold={m.id === inview[currentIndex]?.id} --> + <!-- id={`marker-${m.id}`}>{m.tags.name}</button --> + <!-- > --> + <!-- {/each} --> + <!-- </div> --> </div> <style> |
