mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2026-01-23 10:08:42 +00:00
progress
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<script lang="ts">
|
||||
import { splitAs, SplitType } from '$lib/components/toolbar/tools/scissors/utils.svelte';
|
||||
import { splitAs, SplitType } from '$lib/components/toolbar/tools/scissors/scissors';
|
||||
import Help from '$lib/components/Help.svelte';
|
||||
import { ListRootItem } from '$lib/components/file-list/file-list';
|
||||
import { Label } from '$lib/components/ui/label/index.js';
|
||||
@@ -8,7 +8,7 @@
|
||||
import * as Select from '$lib/components/ui/select';
|
||||
import { Separator } from '$lib/components/ui/separator';
|
||||
import { gpxStatistics, slicedGPXStatistics } from '$lib/stores';
|
||||
import { map } from '$lib/components/map/map.svelte';
|
||||
import { map } from '$lib/components/map/map';
|
||||
import { get } from 'svelte/store';
|
||||
import { i18n } from '$lib/i18n.svelte';
|
||||
import { onDestroy, tick } from 'svelte';
|
||||
@@ -16,7 +16,7 @@
|
||||
import { dbUtils } from '$lib/db';
|
||||
import { SplitControls } from './split-controls';
|
||||
import { getURLForLanguage } from '$lib/utils';
|
||||
import { selection } from '$lib/logic/selection.svelte';
|
||||
import { selection } from '$lib/logic/selection';
|
||||
|
||||
let props: {
|
||||
class?: string;
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
import { writable, type Writable } from 'svelte/store';
|
||||
|
||||
export enum SplitType {
|
||||
FILES = 'files',
|
||||
TRACKS = 'tracks',
|
||||
SEGMENTS = 'segments',
|
||||
}
|
||||
|
||||
export let splitAs: Writable<SplitType> = writable(SplitType.FILES);
|
||||
@@ -3,10 +3,10 @@ import mapboxgl from 'mapbox-gl';
|
||||
import { dbUtils, getFile } from '$lib/db';
|
||||
import { ListTrackSegmentItem } from '$lib/components/file-list/file-list';
|
||||
import { gpxStatistics } from '$lib/stores';
|
||||
import { tool, Tool } from '$lib/components/toolbar/utils.svelte';
|
||||
import { splitAs } from '$lib/components/toolbar/tools/scissors/utils.svelte';
|
||||
import { tool, Tool } from '$lib/components/toolbar/tools';
|
||||
import { splitAs } from '$lib/components/toolbar/tools/scissors/scissors';
|
||||
import { Scissors } from 'lucide-static';
|
||||
import { applyToOrderedSelectedItemsFromFile, selection } from '$lib/logic/selection.svelte';
|
||||
import { selection } from '$lib/logic/selection';
|
||||
|
||||
export class SplitControls {
|
||||
active: boolean = false;
|
||||
@@ -53,7 +53,7 @@ export class SplitControls {
|
||||
updateControls() {
|
||||
// Update the markers when the files change
|
||||
let controlIndex = 0;
|
||||
applyToOrderedSelectedItemsFromFile((fileId, level, items) => {
|
||||
selection.applyToOrderedSelectedItemsFromFile((fileId, level, items) => {
|
||||
let file = getFile(fileId);
|
||||
|
||||
if (file) {
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
export enum SplitType {
|
||||
FILES = 'files',
|
||||
TRACKS = 'tracks',
|
||||
SEGMENTS = 'segments',
|
||||
}
|
||||
|
||||
export let splitAs = $state({
|
||||
current: SplitType.FILES,
|
||||
});
|
||||
Reference in New Issue
Block a user