cos-archives / hgrid

[UNMAINTAINED] A Javascript-based hierarchical grid that can be used to manage and organize file/folder-like data
Apache License 2.0
23 stars 14 forks source link

[Draggable] Prevent folders from being drag targets #67

Closed brianjgeiger closed 10 years ago

brianjgeiger commented 10 years ago

I need a way to, on a folder-by-folder basis, prevent the UI from letting a folder present as a valid drop target. So, for example, a canAcceptDrop (or a modification of acceptDrop, depending) that would let me return true or false if the selected items can be dropped here. At the very least, it shouldn't highlight the folder as a valid drop target. I might also want to be able to modify the css cursor property for those folders as well differently from what I'm doing for the rest of the folders.

brianjgeiger commented 10 years ago

I will need items (the items being dragged) from the canAccepDrop hook.

sloria commented 10 years ago

Yep. canAccepDrop now receives items and the folder.