dojo/dnd/Selector

Summary

a Selector object, which knows how to select its children

Usage

var foo = new Selector(node,params);

dojo/dnd/Selector

Parameter Type Description
node Node | String

node or node's id to build the selector on

params Object
Optional

a dictionary of parameters

See the dojo/dnd/Selector reference documentation for more information.

Properties

allowNested

Defined by: dojo/dnd/Container

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

current

Defined by: dojo/dnd/Container

The DOM node the mouse is currently hovered over

map

Defined by: dojo/dnd/Container

Map from an item's id (which is also the DOMNode's id) to the dojo/dnd/Container.Item itself.

selection

Defined by: dojo/dnd/Selector

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)

singular

Defined by: dojo/dnd/Selector

skipForm

Defined by: dojo/dnd/Container

Methods

clearItems()

Defined by dojo/dnd/Container

removes all data items from the map

creator()

Defined by dojo/dnd/Container

creator function, dummy at the moment

deleteSelectedNodes()

Defined by dojo/dnd/Selector

deletes all selected items

Returns: function

deletes all selected items

delItem(key)

Defined by dojo/dnd/Container

removes a data item from the map by its key (id)

Parameter Type Description
key String

destroy()

Defined by dojo/dnd/Selector

prepares the object to be garbage-collected

emit(type,event)

Defined by dojo/Evented

Parameter Type Description
type undefined
event undefined

Returns: undefined

forInItems(f,o)

Defined by dojo/dnd/Container

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

Returns: string

forInSelectedItems(f,o)

Defined by dojo/dnd/Selector

iterates over selected items; see dojo/dnd/Container.forInItems() for details

Parameter Type Description
f Function
o Object
Optional

getAllNodes()

Defined by dojo/dnd/Container

returns a list (an array) of all valid child nodes

Returns: undefined

getItem(key)

Defined by dojo/dnd/Container

returns a data item by its key (id)

Parameter Type Description
key String

Returns: undefined

getSelectedNodes()

Defined by dojo/dnd/Selector

returns a list (an array) of selected nodes

Returns: instance

insertNodes(addSelected,data,before,anchor)

Defined by dojo/dnd/Selector

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

Returns: function

inserts new data items (see dojo/dnd/Container.insertNodes() method for details)

markupFactory(params,node,Ctor)

Defined by dojo/dnd/Container

Parameter Type Description
params undefined
node undefined
Ctor undefined

Returns: instance

on(type,listener)

Defined by dojo/Evented

Parameter Type Description
type undefined
listener undefined

Returns: undefined

selectAll()

Defined by dojo/dnd/Selector

selects all items

Returns: undefined

selectNone()

Defined by dojo/dnd/Selector

unselects all items

Returns: undefined

setItem(key,data)

Defined by dojo/dnd/Container

associates a data item with its key (id)

Parameter Type Description
key String
data Container.Item

startup()

Defined by dojo/dnd/Container

collects valid child items and populate the map

sync()

Defined by dojo/dnd/Selector

sync up the node list with the data map

Returns: function

sync up the node list with the data map

Events

onMouseDown(e)

Defined by: dojo/dnd/Selector

event processor for onmousedown

Parameter Type Description
e Event

mouse event

onMouseMove(e)

Defined by: dojo/dnd/Selector

event processor for onmousemove

Parameter Type Description
e Event

mouse event

onMouseOut(e)

Defined by: dojo/dnd/Container

event processor for onmouseout

Parameter Type Description
e Event

mouse event

onMouseOver(e)

Defined by: dojo/dnd/Container

event processor for onmouseover or touch, to mark that element as the current element

Parameter Type Description
e Event

mouse event

onMouseUp(e)

Defined by: dojo/dnd/Selector

event processor for onmouseup

Parameter Type Description
e Event

mouse event

onOutEvent()

Defined by: dojo/dnd/Selector

this function is called once, when mouse is out of our container

onOverEvent()

Defined by: dojo/dnd/Selector

this function is called once, when mouse is over our container

onSelectStart(e)

Defined by: dojo/dnd/Container

event processor for onselectevent and ondragevent

Parameter Type Description
e Event

mouse event

© 2005–2017 JS Foundation
Licensed under the AFL 2.1 and BSD 3-Clause licenses.
http://dojotoolkit.org/api/1.10/dojo/dnd/Selector.html