This is a base class for dijit/tree/dndSource, and isn't meant to be used directly. It's based on dojo/dnd/Selector.
See the dijit/tree/_dndSelector reference documentation for more information.
The currently hovered TreeNode. Not set to anything for keyboard operation. (TODO: change?)
(id to DomNode) map for every TreeNode that's currently selected. The DOMNode is the TreeNode.rowNode.
Allows selection of only one element, if true. Tree hasn't been tested in singular=true mode, unclear if it works.
Adds a class with prefix "dojoDndItem"
Parameter | Type | Description |
---|---|---|
node | Node | A node |
type | String | A variable suffix for a class name |
Changes a named state to new state value
Parameter | Type | Description |
---|---|---|
type | String | A name of the state to change |
newState | String | new state |
Parameter | Type | Description |
---|---|---|
n1 | undefined | |
n2 | undefined |
Removes a class with prefix "dojoDndItem"
Parameter | Type | Description |
---|---|---|
node | Node | A node |
type | String | extension |
Returns a copy of xs which lacks any objects occurring in ys. Checks for membership by modifying and then reading the object, so it will not properly handle sets of numbers or strings.
Parameter | Type | Description |
---|---|---|
xs | undefined | |
ys | undefined |
Update the following tree properties from the current selection: path[s], selectedItem[s], selectedNode[s]
add node to current selection
Parameter | Type | Description |
---|---|---|
node | Node | node to add |
isAnchor | Boolean |
Optional Whether the node should become anchor. |
node to add
Iterates over selected items;
see dojo/dnd/Container.forInItems()
for details
Parameter | Type | Description |
---|---|---|
f | Function | |
o | Object |
Optional
|
Returns the dojo/dnd/Container._Item (representing a dragged node) by it's key (id). Called by dojo/dnd/Source.checkAcceptance().
Parameter | Type | Description |
---|---|---|
key | String |
Returns a list of selected node(s). Used by dndSource on the start of a drag.
return true if node is currently selected
Parameter | Type | Description |
---|---|---|
node | Node | the node to check whether it's in the current selection |
remove node and it's descendants from current selection
Parameter | Type | Description |
---|---|---|
node | Node | node to remove |
node to remove
set the list of selected nodes to be exactly newSelection. All changes to the selection should be passed through this function, which ensures that derived attributes are kept up to date. Anchor will be deleted if it has been removed from the selection, but no new anchor will be added by this function.
Parameter | Type | Description |
---|---|---|
newSelection | Node[] | list of tree nodes to make selected |
Add or remove the given node from selection, responding to a user action such as a click or keypress.
Parameter | Type | Description |
---|---|---|
node | undefined | |
multi | Boolean | Indicates whether this is meant to be a multi-select action (e.g. ctrl-click) |
range | Boolean | Indicates whether this is meant to be a ranged action (e.g. shift-click) |
Event processor for onmousedown/ontouchstart/onkeydown corresponding to a click event
Parameter | Type | Description |
---|---|---|
e | Event | onmousedown/ontouchstart/onkeydown event |
Event processor for onmouseup/ontouchend/onkeyup corresponding to a click event
Parameter | Type | Description |
---|---|---|
e | Event | onmouseup/ontouchend/onkeyup event |
event processor for onmousemove/ontouchmove
Parameter | Type | Description |
---|---|---|
e | Event | onmouseup/ontouchend event |
Called when mouse is moved away from a TreeNode
Parameter | Type | Description |
---|---|---|
widget | TreeNode | |
evt | Event |
Called when mouse is moved over a TreeNode
Parameter | Type | Description |
---|---|---|
widget | TreeNode | |
evt | Event |
This function is called once, when mouse is out of our container
This function is called once, when mouse is over our container