A Source Object, which can be used only as a DnD source. A Source can contained several dnd items. A dnd item is not a source.
Parameter | Type | Description |
---|---|---|
node | DOMNode | String | Node or node's id to build the source on. |
params | dojo.dnd.__SourceArgs |
Optional Any property of this class may be configured via the params object which is mixed-in to the 'dojo.dnd.Source' instance. |
See the dojox/mdnd/PureSource reference documentation for more information.
Indicates whether to allow dnd item nodes to be nested within other elements. By default this is false, indicating that only direct children of the container can be draggable dnd item nodes
Map from an item's id (which is also the DOMNode's id) to the dojo/dnd/Container.Item itself.
The set of id's that are currently selected, such that this.selection[id] == 1 if the node w/that id is selected. Can iterate over selected node's id's like:
for(var id in this.selection)
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 |
gets a child, which is under the mouse at the moment, or null
Parameter | Type | Description |
---|---|---|
e | Event | a mouse event |
Checks if user clicked on "approved" items.
Parameter | Type | Description |
---|---|---|
e | Event | Mouse event. |
True if user clicked on "approved" items.
Changes source's state based on "copy" status.
Parameter | Type | Description |
---|---|---|
copy | Boolean | Copy status. |
adds all necessary data to the output of the user-supplied creator function
Parameter | Type | Description |
---|---|---|
item | Container.Item | |
hint | String |
removes a class with prefix "dojoDndItem"
Parameter | Type | Description |
---|---|---|
node | Node | a node |
type | String[] | Type(s) of this item, by default this is ["text"] |
Returns true, if we need to copy items, false to move. It is separated to be overwritten dynamically, if needed.
Parameter | Type | Description |
---|---|---|
keyPressed | Boolean | The "copy" was pressed. |
True, if we need to copy items, false to move.
removes a data item from the map by its key (id)
Parameter | Type | Description |
---|---|---|
key | String |
iterates over a data map skipping members that are present in the empty object (IE and/or 3rd-party libraries).
Parameter | Type | Description |
---|---|---|
f | Function | |
o | Object |
Optional
|
iterates over selected items;
see dojo/dnd/Container.forInItems()
for details
Parameter | Type | Description |
---|---|---|
f | Function | |
o | Object |
Optional
|
returns a data item by its key (id)
Parameter | Type | Description |
---|---|---|
key | String |
inserts new data items (see dojo/dnd/Container.insertNodes()
method for details)
Parameter | Type | Description |
---|---|---|
addSelected | Boolean | all new nodes will be added to selected items, if true, no selection change otherwise |
data | Array | a list of data items, which should be processed by the creator function |
before | Boolean | insert before the anchor, if true, and after the anchor otherwise |
anchor | Node | the anchor node to be used as a point of insertion |
inserts new data items (see dojo/dnd/Container.insertNodes()
method for details)
Markup methods.
Parameter | Type | Description |
---|---|---|
params | Object | ??? |
node | DomNode | ??? |
New dojox.mdnd.PureSource instance.
Parameter | Type | Description |
---|---|---|
type | undefined | |
listener | undefined |
associates a data item with its key (id)
Parameter | Type | Description |
---|---|---|
key | String | |
data | Container.Item |
sync up the node list with the data map
sync up the node list with the data map
Topic event processor for /dnd/cancel, called to cancel the Dnd operation.
Event processor for onmousedown.
Parameter | Type | Description |
---|---|---|
e | Event | Mouse event. |
Event processor for onmousemove.
Parameter | Type | Description |
---|---|---|
e | Event | Mouse event. |
event processor for onmouseout
Parameter | Type | Description |
---|---|---|
e | Event | mouse event |
event processor for onmouseover or touch, to mark that element as the current element
Parameter | Type | Description |
---|---|---|
e | Event | mouse event |
Event processor for onmouseup.
Parameter | Type | Description |
---|---|---|
e | Event | Mouse event |
event processor for onselectevent and ondragevent
Parameter | Type | Description |
---|---|---|
e | Event | mouse event |