mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2025-09-02 16:52:31 +00:00
drop file to load
This commit is contained in:
@@ -33,7 +33,8 @@
|
|||||||
exportAllFiles,
|
exportAllFiles,
|
||||||
exportSelectedFiles,
|
exportSelectedFiles,
|
||||||
triggerFileInput,
|
triggerFileInput,
|
||||||
createFile
|
createFile,
|
||||||
|
loadFiles
|
||||||
} from '$lib/stores';
|
} from '$lib/stores';
|
||||||
import { selectAll, selection } from '$lib/components/file-list/Selection';
|
import { selectAll, selection } from '$lib/components/file-list/Selection';
|
||||||
import { derived } from 'svelte/store';
|
import { derived } from 'svelte/store';
|
||||||
@@ -340,6 +341,13 @@
|
|||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
|
on:dragover={(e) => e.preventDefault()}
|
||||||
|
on:drop={(e) => {
|
||||||
|
e.preventDefault();
|
||||||
|
if (e.dataTransfer.files.length > 0) {
|
||||||
|
loadFiles(e.dataTransfer.files);
|
||||||
|
}
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<style lang="postcss">
|
<style lang="postcss">
|
||||||
|
Reference in New Issue
Block a user