mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2025-11-06 06:21:08 +00:00
progress
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
<script lang="ts">
|
||||
import { Tool, tool } from '$lib/components/toolbar/utils.svelte';
|
||||
import { settings } from '$lib/db';
|
||||
import * as Card from '$lib/components/ui/card';
|
||||
import Routing from '$lib/components/toolbar/tools/routing/Routing.svelte';
|
||||
import Scissors from '$lib/components/toolbar/tools/scissors/Scissors.svelte';
|
||||
import Waypoint from '$lib/components/toolbar/tools/Waypoint.svelte';
|
||||
import Waypoint from '$lib/components/toolbar/tools/waypoint/Waypoint.svelte';
|
||||
import Time from '$lib/components/toolbar/tools/Time.svelte';
|
||||
import Merge from '$lib/components/toolbar/tools/Merge.svelte';
|
||||
import Extract from '$lib/components/toolbar/tools/Extract.svelte';
|
||||
@@ -14,12 +13,20 @@
|
||||
import RoutingControlPopup from '$lib/components/toolbar/tools/routing/RoutingControlPopup.svelte';
|
||||
import { onMount } from 'svelte';
|
||||
import mapboxgl from 'mapbox-gl';
|
||||
import { settings } from '$lib/logic/settings.svelte';
|
||||
|
||||
let {
|
||||
popupElement,
|
||||
popup,
|
||||
class: className = '',
|
||||
}: {
|
||||
popupElement: HTMLDivElement;
|
||||
popup: mapboxgl.Popup;
|
||||
class: string;
|
||||
} = $props();
|
||||
|
||||
const { minimizeRoutingMenu } = settings;
|
||||
|
||||
let popupElement: HTMLElement;
|
||||
let popup: mapboxgl.Popup;
|
||||
|
||||
onMount(() => {
|
||||
popup = new mapboxgl.Popup({
|
||||
closeButton: false,
|
||||
@@ -31,12 +38,16 @@
|
||||
</script>
|
||||
|
||||
{#if tool.current !== null}
|
||||
<div class="translate-x-1 h-full animate-in animate-out {$$props.class ?? ''}">
|
||||
<div class="translate-x-1 h-full animate-in animate-out {className}">
|
||||
<div class="rounded-md shadow-md pointer-events-auto">
|
||||
<Card.Root class="rounded-md border-none">
|
||||
<Card.Content class="p-2.5">
|
||||
{#if tool.current === Tool.ROUTING}
|
||||
<Routing {popup} {popupElement} bind:minimized={$minimizeRoutingMenu} />
|
||||
<Routing
|
||||
{popup}
|
||||
{popupElement}
|
||||
bind:minimized={minimizeRoutingMenu.value}
|
||||
/>
|
||||
{:else if tool.current === Tool.SCISSORS}
|
||||
<Scissors />
|
||||
{:else if tool.current === Tool.WAYPOINT}
|
||||
|
||||
Reference in New Issue
Block a user