Opened 11 years ago
Closed 11 years ago
#9684 closed task (fixed)
API doc for function parameter / return types
Reported by: | bill | Owned by: | bill |
---|---|---|---|
Priority: | high | Milestone: | 1.4 |
Component: | DnD | Version: | 1.3.2 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
Add some doc to DnD code and Tree DnD code, particularly about the parameters and return types currently marked as "Object" that represent the dojo.dnd "item" (not to be confused with the dojo.data item).
Change History (3)
comment:1 Changed 11 years ago by
comment:2 Changed 11 years ago by
comment:3 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
(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.
(In [19638]) Update DnD API doc, in particular about the ({id: 123, data: "hello world", type: text?}) type objects that are passed to / returned from various methods. I've named this dojo.dnd.Item since it's returned by getItem(), although it shouldn't be confused with dojo.data.Item. (refs #9684).
Also updating Tree.model API doc for extra parameters added to newItem() for multi-parented items support (refs #9361).
!strict.