|
|
|
_addItemClass(
node
: Node
type
: String
) :
void
adds a class with prefix "dojoDndItem"
Parameter |
Type |
Usage |
Description |
node |
Node |
required |
a node |
type |
String |
required |
a variable suffix for a class name |
|
|
|
|
_changeState(
type
: String
newState
: String
) :
void
changes a named state to new state value
Parameter |
Type |
Usage |
Description |
type |
String |
required |
a name of the state to change |
newState |
String |
required |
new state |
|
|
|
|
_getChildByEvent(
e
: Event
) :
void
gets a child, which is under the mouse at the moment, or null
Parameter |
Type |
Usage |
Description |
e |
Event |
required |
a mouse event |
|
|
|
|
_legalMouseDown(
e
: Event
) :
void
checks if user clicked on "approved" items
Parameter |
Type |
Usage |
Description |
e |
Event |
required |
mouse event |
|
|
|
|
_markDndStatus(
copy
) :
void
changes source's state based on "copy" status
Parameter |
Type |
Usage |
Description |
copy |
|
required |
|
|
|
|
|
_markTargetAnchor(
before
: Boolean
) :
void
assigns a class to the current target anchor based on "before" status
Parameter |
Type |
Usage |
Description |
before |
Boolean |
required |
insert before, if true, after otherwise |
|
|
|
|
_normalizedCreator(
node
hint
) :
void
adds all necessary data to the output of the user-supplied creator function
Parameter |
Type |
Usage |
Description |
node |
|
required |
|
hint |
|
required |
|
|
|
|
|
_removeAnchor(
) :
void
|
|
|
|
_removeItemClass(
node
: Node
type
: String
) :
void
removes a class with prefix "dojoDndItem"
Parameter |
Type |
Usage |
Description |
node |
Node |
required |
a node |
type |
String |
required |
a variable suffix for a class name |
|
|
|
|
_removeSelection(
) :
void
|
|
|
|
_unmarkTargetAnchor(
) :
void
removes a class of the current target anchor based on "before" status
|
|
|
|
checkAcceptance(
source
: Object
nodes
: Array
) :
void
checks if the target can accept nodes from this source
Parameter |
Type |
Usage |
Description |
source |
Object |
required |
the source which provides items |
nodes |
Array |
required |
the list of transferred items |
|
|
|
|
clearItems(
) :
void
removes all data items from the map
|
|
|
|
constructor(
node
: DOMNode|String
params
: dojo.dnd.__SourceArgs
) :
void
a constructor of the Source
Parameter |
Type |
Usage |
Description |
node |
DOMNode|String |
required |
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 |
|
|
|
|
copyState(
keyPressed
: Boolean
self
: Boolean
) :
void
Returns true if we need to copy items, false to move.
It is separated to be overwritten dynamically, if needed.
Parameter |
Type |
Usage |
Description |
keyPressed |
Boolean |
required |
the "copy" key was pressed |
self |
Boolean |
optional |
optional flag that means that we are about to drop on itself |
|
|
|
|
creator(
) :
void
creator function, dummy at the moment
|
|
|
|
deleteSelectedNodes(
) :
void
deletes all selected items
|
|
|
|
delItem(
key
: String
) :
void
removes a data item from the map by its key (id)
Parameter |
Type |
Usage |
Description |
key |
String |
required |
|
|
|
|
|
destroy(
) :
void
prepares the object to be garbage-collected
|
|
|
|
forInItems(
f
: Function
o
: Object
) :
void
iterates over a data map skipping members that
are present in the empty object (IE and/or 3rd-party libraries).
Parameter |
Type |
Usage |
Description |
f |
Function |
required |
|
o |
Object |
optional |
|
|
|
|
|
forInSelectedItems(
f
: Function
o
: Object
) :
void
iterates over selected items;
see dojo.dnd.Container.forInItems() for details
Parameter |
Type |
Usage |
Description |
f |
Function |
required |
|
o |
Object |
optional |
|
|
|
|
|
getAllNodes(
) :
void
returns a list (an array) of all valid child nodes
|
|
|
|
getItem(
key
: String
) :
void
returns a data item by its key (id)
Parameter |
Type |
Usage |
Description |
key |
String |
required |
|
|
|
|
|
getSelectedNodes(
) :
void
returns a list (an array) of selected nodes
|
|
|
|
insertNodes(
addSelected
: Boolean
data
: Array
before
: Boolean
anchor
: Node
) :
void
inserts new data items (see dojo.dnd.Container.insertNodes() method for details)
Parameter |
Type |
Usage |
Description |
addSelected |
Boolean |
required |
all new nodes will be added to selected items, if true, no selection change otherwise |
data |
Array |
required |
a list of data items, which should be processed by the creator function |
before |
Boolean |
required |
insert before the anchor, if true, and after the anchor otherwise |
anchor |
Node |
required |
the anchor node to be used as a point of insertion |
|
|
|
|
markupFactory(
params
node
) :
void
Parameter |
Type |
Usage |
Description |
params |
|
required |
|
node |
|
required |
|
|
|
|
|
onDndCancel(
) :
void
topic event processor for /dnd/cancel, called to cancel the DnD operation
|
|
|
|
onDndDrop(
source
: Object
nodes
: Array
copy
: Boolean
target
: Object
) :
void
topic event processor for /dnd/drop, called to finish the DnD operation
Parameter |
Type |
Usage |
Description |
source |
Object |
required |
the source which provides items |
nodes |
Array |
required |
the list of transferred items |
copy |
Boolean |
required |
copy items, if true, move items otherwise |
target |
Object |
required |
the target which accepts items |
|
|
|
|
onDndSourceOver(
source
: Object
) :
void
topic event processor for /dnd/source/over, called when detected a current source
Parameter |
Type |
Usage |
Description |
source |
Object |
required |
the source which has the mouse over it |
|
|
|
|
onDndStart(
source
: Object
nodes
: Array
copy
: Boolean
) :
void
topic event processor for /dnd/start, called to initiate the DnD operation
Parameter |
Type |
Usage |
Description |
source |
Object |
required |
the source which provides items |
nodes |
Array |
required |
the list of transferred items |
copy |
Boolean |
required |
copy items, if true, move items otherwise |
|
|
|
|
onDraggingOut(
) :
void
called during the active DnD operation, when items
are dragged away from this target, and it is not disabled
|
|
|
|
onDraggingOver(
) :
void
called during the active DnD operation, when items
are dragged over this target, and it is not disabled
|
|
|
|
onDrop(
source
: Object
nodes
: Array
copy
: Boolean
) :
void
called only on the current target, when drop is performed
Parameter |
Type |
Usage |
Description |
source |
Object |
required |
the source which provides items |
nodes |
Array |
required |
the list of transferred items |
copy |
Boolean |
required |
copy items, if true, move items otherwise |
|
|
|
|
onDropExternal(
source
: Object
nodes
: Array
copy
: Boolean
) :
void
called only on the current target, when drop is performed
from an external source
Parameter |
Type |
Usage |
Description |
source |
Object |
required |
the source which provides items |
nodes |
Array |
required |
the list of transferred items |
copy |
Boolean |
required |
copy items, if true, move items otherwise |
|
|
|
|
onDropInternal(
nodes
: Array
copy
: Boolean
) :
void
called only on the current target, when drop is performed
from the same target/source
Parameter |
Type |
Usage |
Description |
nodes |
Array |
required |
the list of transferred items |
copy |
Boolean |
required |
copy items, if true, move items otherwise |
|
|
|
|
onMouseDown(
e
: Event
) :
void
event processor for onmousedown
Parameter |
Type |
Usage |
Description |
e |
Event |
required |
mouse event |
|
|
|
|
onMouseMove(
e
: Event
) :
void
event processor for onmousemove
Parameter |
Type |
Usage |
Description |
e |
Event |
required |
mouse event |
|
|
|
|
onMouseOut(
e
: Event
) :
void
event processor for onmouseout
Parameter |
Type |
Usage |
Description |
e |
Event |
required |
mouse event |
|
|
|
|
onMouseOver(
e
: Event
) :
void
event processor for onmouseover
Parameter |
Type |
Usage |
Description |
e |
Event |
required |
mouse event |
|
|
|
|
onMouseUp(
e
: Event
) :
void
event processor for onmouseup
Parameter |
Type |
Usage |
Description |
e |
Event |
required |
mouse event |
|
|
|
|
onOutEvent(
) :
void
this function is called once, when mouse is out of our container
|
|
|
|
onOverEvent(
) :
void
this function is called once, when mouse is over our container
|
|
|
|
onSelectStart(
e
: Event
) :
void
event processor for onselectevent and ondragevent
Parameter |
Type |
Usage |
Description |
e |
Event |
required |
mouse event |
|
|
|
|
selectAll(
) :
void
|
|
|
|
selectNone(
) :
void
|
|
|
|
setItem(
key
: String
data
: dojo.dnd.Item
) :
void
associates a data item with its key (id)
Parameter |
Type |
Usage |
Description |
key |
String |
required |
|
data |
dojo.dnd.Item |
required |
|
|
|
|
|
startup(
) :
void
collects valid child items and populate the map
|
|
|
|
sync(
) :
void
sync up the node list with the data map
|