Skip to content
Permalink
Browse files

Drag multiple files at once

  • Loading branch information
1j01 committed Jan 2, 2020
1 parent b386d88 commit cfb15cccf5f308dae53cb00da61a1a8e08526958
Showing with 7 additions and 3 deletions.
  1. +7 −3 src/$FolderView.js
@@ -143,8 +143,12 @@ function $FolderView(folder_path) {
});
};
$folder_view.on("pointerdown", ".desktop-icon", function(e){
$folder_view.find(".desktop-icon").removeClass("selected focused");
$(this).addClass("selected focused");
$folder_view.find(".desktop-icon").removeClass("focused");
$(this).addClass("focused");
if (!$(this).hasClass("selected")) {
$folder_view.find(".desktop-icon").removeClass("selected");
$(this).addClass("selected");
}
});
$folder_view.on("pointerdown", function(e){
// TODO: allow a margin of mouse movement before starting selecting
@@ -157,7 +161,7 @@ function $FolderView(folder_path) {
current = {x: e.pageX - folder_view_offset.left, y: e.pageY - folder_view_offset.top};
if($icon.length > 0){
$marquee.hide();
set_dragging_file_paths($icon.get().map((icon)=>
set_dragging_file_paths($(".desktop-icon.selected").get().map((icon)=>
icon.dataset.filePath
).filter((file_path)=> file_path));
}else{

0 comments on commit cfb15cc

Please sign in to comment.
You can’t perform that action at this time.