From 3a5d21db11a2f128e5f51df9c123b7abc367c778 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Mon, 20 Nov 2023 09:26:06 -0800 Subject: randomize avatars --- src/components/LocationsMap.svelte | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'src/components') diff --git a/src/components/LocationsMap.svelte b/src/components/LocationsMap.svelte index 6f84408e..d5caba0d 100644 --- a/src/components/LocationsMap.svelte +++ b/src/components/LocationsMap.svelte @@ -3,6 +3,7 @@ import { browser } from '$app/environment'; import html2canvas from 'html2canvas'; import { Icon, Popup } from '$comp'; + import { shuffleArray } from "$lib/utils"; import 'maplibre-gl/dist/maplibre-gl.css'; @@ -129,13 +130,6 @@ 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; -- cgit v1.2.3