A lot of things

This commit is contained in:
2026-06-16 16:21:43 +02:00
parent 4f9f6c63b3
commit 7e1e26f20b
126 changed files with 7917 additions and 204 deletions

View File

@@ -12,6 +12,8 @@ export function GalleryManager() {
*/
images: [],
dragSrcI: null,
/**
* Forward to this.images.length
* @returns {number}
@@ -123,6 +125,25 @@ export function GalleryManager() {
handleRemoveFile(index){
this.images[index].handleRemoveFile(null);
this.images.splice(index, 1);
},
dragStart(index){
this.dragSrcI = index;
},
dragOver(e, index){
e.preventDefault();
if( this.dragSrcI === null || this.dragSrcI === index )
return;
const moved = this.images.splice(this.dragSrcI, 1)[0];
this.images.splice(index, 0, moved);
this.dragSrcI = index;
},
dragEnd(){
this.dragSrcI = null;
}
}
}