mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2025-09-01 08:12:32 +00:00
drop file to load
This commit is contained in:
@@ -33,7 +33,8 @@
|
||||
exportAllFiles,
|
||||
exportSelectedFiles,
|
||||
triggerFileInput,
|
||||
createFile
|
||||
createFile,
|
||||
loadFiles
|
||||
} from '$lib/stores';
|
||||
import { selectAll, selection } from '$lib/components/file-list/Selection';
|
||||
import { derived } from 'svelte/store';
|
||||
@@ -340,6 +341,13 @@
|
||||
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">
|
||||
|
Reference in New Issue
Block a user