Opened 10 years ago

Closed 10 years ago

#9685 closed enhancement (fixed)

Tree: drag source should support forInSelectedItems()

Reported by: bill Owned by: bill
Priority: high Milestone: 1.4
Component: Dijit Version: 1.3.2
Keywords: Cc:
Blocked By: Blocking:

Description

The tree drag source doesn't have a forInSelectedItems() but that's expected from drag sources, since dojo.dnd.Source supports it.

Change History (1)

comment:1 Changed 10 years ago by bill

Resolution: fixed
Status: newclosed

(In [19652]) Number of fixes (!strict) around Tree DnD:

  • When dragging from a Tree and dropping somewhere, source.getItem() should return a dojo.dnd.Item, not a DomNode? (fixes #7058)
    • Pass source to itemCreator() so that the function can see the type of the dragged nodes. Also fixed documentation of itemCreator(). (fixes #9683)
  • fix dragging a random (non TreeNode?) widget and dropping onto the tree. In this case Tree should not assume the dragged widget has a dojo.data item, parentNode, etc. like TreeNode?'s do. (fixes #9550)
  • better documentation (fixes #9684)
  • make Tree drag source support forInSelectedItems(), like dojo.dnd.Source (fixes #9685)
  • Avoid memory leak on IE by using dojo.attr(node, "id", ...) rather than setting id on the node's JS object (not sure if this matters though since id is a standard attribute name, not an expando property). (refs #9614)

I wasn't sure what fields are best to set in the object returned from getItem(). For now it's just setting type == treeNode and data == the TreeNode? widget.

Note: See TracTickets for help on using tickets.