Dragging a file right away to a valid folder works but when I try to drag a file across an invalid folder and then back to a valid folder, it fails.
It logs this in the console when I am dragging across an invalid folder. Do I somehow need to manually change this property?
Fancytree@1 applyDropEffectCallback: allowDrop === false
my current code is simple.
dragStart: function(node, data) {
//Prevent user from moving folder
if (node.isFolder()) {
return false
}
return true
},
dragEnter: function(node, data) {
if (node.data.restricted){
return false;
}
return true;
}}
Structure of my fancy tree.
Root Folder
--Sub Folder 1
--Sub Folder 2
--Sub Folder 3
Inside each subfolder is a file that I am trying to drag and drop to another valid folder. Each folder has a property called restricted that I check against to know if it's a valid folder to drop in. In the above case, the root folder and subfolder 3 are invalid. If I drag and drop a file from folder 1 to folder 2. It works. But when I dnd it from folder 1 to folder 3(it will restrict me as intended), and still holding the mouse click, back to folder 2. It remains restricted(dragEnter logs true correctly) and now I can not drop the file in any valid folder. Once I let go of the mouse click, the same behavior repeats where I can dnd into a valid folder initally.