From afa0e0368c01942e01ca573f5b7c3794d4e78347 Mon Sep 17 00:00:00 2001 From: PaulPlay <80539587+therealPaulPlay@users.noreply.github.com> Date: Tue, 29 Oct 2024 18:16:45 +0100 Subject: [PATCH] bug fixes, add license --- LICENSE | 33 +++++++++++++++++++++++++++++++++ src/lib/components/Map.svelte | 6 ++++++ static/json/regions.json | 2 +- 3 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..f0cda96 --- /dev/null +++ b/LICENSE @@ -0,0 +1,33 @@ +Copyright (c) 2024 Paul Rhomberg | PaulPlay + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +“Commons Clause” License Condition v1.0 + +The Software is provided to you by the Licensor under the License, as defined below, subject to the following condition. +Without limiting other conditions in the License, the grant of rights under the License will not include, and the License does not grant to you, the right to Sell the Software. + +For purposes of the foregoing, “Sell” means practicing any or all of the rights granted to you under the License to provide to third parties, for a fee or other consideration (including without limitation fees for hosting or consulting/ support services related to the Software), a product or service whose value derives, entirely or substantially, from the functionality of the Software. Any license notice or attribution required by the License must also include this Commons Clause License Condition notice. + +Software: OpenGuessr Education and all associated files + +License: MIT + +Licensor: Paul Rhomberg | PaulPlay + diff --git a/src/lib/components/Map.svelte b/src/lib/components/Map.svelte index 27bc7e8..3035bca 100644 --- a/src/lib/components/Map.svelte +++ b/src/lib/components/Map.svelte @@ -497,6 +497,7 @@ function handleTouchStart(event) { + if (!interactive) return; if (event.touches.length === 1) { isTouching = true; const touch = event.touches[0]; @@ -510,6 +511,8 @@ } function handleTouchMove(event) { + if (!interactive) return; + if (isTouching && event.touches.length === 1) { event.preventDefault(); // Prevent page scroll rect = mapContainer.getBoundingClientRect(); @@ -567,12 +570,15 @@ } function getTouchDistance(touches) { + if (!interactive) return; + const dx = touches[0].clientX - touches[1].clientX; const dy = touches[0].clientY - touches[1].clientY; return Math.sqrt(dx * dx + dy * dy); } onMount(() => { + if (!interactive) return; mapContainer.addEventListener('touchstart', handleTouchStart); mapContainer.addEventListener('touchmove', handleTouchMove); mapContainer.addEventListener('touchend', handleTouchEnd); diff --git a/static/json/regions.json b/static/json/regions.json index 02223a3..1bb6377 100644 --- a/static/json/regions.json +++ b/static/json/regions.json @@ -28,7 +28,7 @@ "Gambia", "Ghana", "Guinea", - "Guinea-Bissau", + "Guinea Bissau", "Ivory Coast", "Kenya", "Lesotho",