Login Register

Tree DND Handle support

I'm trying to programmatically create a nested list of items (for my purposes a maximum of three deep), where only the leaf nodes are drag-able.

So far, I've tried using nested dijit.TitlePanes with multiple dojo.dnd.Sources, however this gets slower the more dojo.dnd.Sources you have (somewhere around 50 or so it becomes unbearable on a fairly decent system).

I took a look at the tree structure, but it looks like the idea of "Handles" was removed from the DND surrounding them, and wasn't able to find a good way to inhibit the dragging of non-leaf nodes.

The last thing I was going to try was one big source node, with insertNode'd TitlePanes (without handles), ensuring placement with anchors. (Bad idea? You tell me!)

Does anyone have ideas how this might be done?