Login Register Help
API Documentation
Choose a stylesheet:

Constructordojo.dnd.Source

dojo.require("dojo.dnd.Source");
defined in dojo/dnd/Source.js
a Source object, which can be used as a DnD source, or a DnD target

Usage

var foo=new dojo.dnd.Source(node: Node:, params: Object:);
parametertypedescription
nodeNode:node or node's id to build the selector on
paramsObject:a dict of parameters, recognized parameters are:

Jump to PropertiesJump to FunctionsConstructorsBack to top

prepares the object to be garbage-collected
topic event processor for /dnd/cancel, called to cancel the DnD operation
topic event processor for /dnd/source/over, called when detected a current source
topic event processor for /dnd/start, called to initiate the DnD operation
event processor for onmousedown
event processor for onmousemove
event processor for onmouseup
assigns a class to the current target anchor based on "before" status
removes a class of the current target anchor based on "before" status

Jump to PropertiesJump to ConstructorsFunctionsBack to top

FunctioncheckAcceptance(source: Object:, nodes: Array:): Boolean
Overrides
checks, if the target can accept nodes from this source
a constructor of the Source
FunctioncopyState(keyPressed: Boolean:, self: Boolean:?): Boolean
Overrides
Returns true, if we need to copy items, false to move. It is separated to be overwritten dynamically, if needed.
Defined by dojo.dnd.Container
removes a data item from the map by its key (id)
FunctiongetAllNodes(): NodeList
Defined by dojo.dnd.Container
returns a list (an array) of all valid child nodes
Defined by dojo.dnd.Container
returns a data item by its key (id)
Defined by dojo.dnd.Selector
returns a list (an array) of selected nodes
FunctioninsertNodes(data: Array:, before: Boolean:, anchor: Node:): self
Defined by dojo.dnd.Container
inserts an array of new nodes before/after an anchor node
FunctiononDndDrop(source: Object:, nodes: Array:, copy: Boolean:, target: Object:)
Overrides
topic event processor for /dnd/drop, called to finish the DnD operation
Overrides
called during the active DnD operation, when items are dragged away from this target, and it is not disabled
Overrides
called during the active DnD operation, when items are dragged over this target, and it is not disabled
FunctiononDrop(source: Object:, nodes: Array:, copy: Boolean:)
Overrides
called only on the current target, when drop is performed
this function is called once, when mouse is out of our container
Overrides dojo.dnd.Container,
this function is called once, when mouse is over our container
FunctiononSelectStart(e: Event:)
Defined by dojo.dnd.Container
event processor for onselectevent and ondragevent
FunctionselectAll(): self
Defined by dojo.dnd.Selector
selects all items
FunctionselectNone(): self
Defined by dojo.dnd.Selector
unselects all items
FunctionsetItem(key: String, data: Object)
Defined by dojo.dnd.Container
associates a data item with its key (id)
Function_addItemClass(node: Node:, type: String:)
Defined by dojo.dnd.Container
adds a class with prefix "dojoDndItem"
Function_changeState(type: String:, newState: String:)
Defined by dojo.dnd.Container
changes a named state to new state value
Function_getChildByEvent(e: Event:)
Defined by dojo.dnd.Container
gets a child, which is under the mouse at the moment, or null
Overrides
checks if user clicked on "approved" items
Overrides
changes source's state based on "copy" status
Function_normalizedCreator(item, hint)
Defined by dojo.dnd.Container
adds all necessary data to the output of the user-supplied creator function
Function_removeItemClass(node: Node:, type: String:)
Defined by dojo.dnd.Container
removes a class with prefix "dojoDndItem"

Jump to FunctionsJump to ConstructorsPropertiesBack to top

Overrides
Overrides , dojo.dnd.Selector
autosynchronizes the source with its list of DnD nodes, false by default
Defined by
Overrides
Defined by dojo.dnd.Container
a creator function, which takes a data item, and returns an object like that: {node: newNode, data: usedData, type: arrayOfStrings}
Overrides
Overrides
Overrides
Defined by
Overrides
Defined by
Defined by dojo.dnd.Container
node or node's id to build the container on
Overrides
Overrides
Defined by dojo.dnd.Selector
allows selection of only one element, if true the rest of parameters are passed to the container
Overrides dojo.dnd.Container,
don't start the drag operation, if clicked on form elements dropParent: Node: node or node's id to use as the parent node for dropped items (must be underneath the 'node' parameter in the DOM) _skipStartup: Boolean: skip startup(), which collects children, for deferred initialization (this is used in the markup mode)
Defined by
Defined by
Defined by
Defined by
Defined by
Overrides
Defined by
Defined by