dojox/layout/dnd/PlottedDnd (version 1.10)

dojo/dnd/Source

Summary

dnd source handling plotted zone to show the dropping area

Usage

var foo = new PlottedDnd(node,params);
dojox/layout/dnd/PlottedDnd
Parameter Type Description
node Node
params Object

Property Summary

Method Summary

Event Summary

  • onDndCancel() Called to cancel the DnD operation.
  • onDndDrop(source,nodes,copy,target) Called to finish the DnD operation
  • onDndSourceOver(source) topic event processor for /dnd/source/over, called when detected a current source
  • onDndStart(source,nodes,copy) Called to initiate the DnD operation.
  • onDraggingOut() called during the active DnD operation, when items are dragged away from this target, and it is not disabled
  • onDraggingOver() called during the active DnD operation, when items are dragged over this target, and it is not disabled
  • onDrop(source,nodes,copy) called only on the current target, when drop is performed
  • onDropExternal(source,nodes,copy) called only on the current target, when drop is performed from an external source
  • onDropInternal(nodes,copy) called only on the current target, when drop is performed from the same target/source
  • onMouseDown(e) Event processor for onmousedown.
  • onMouseMove(e) Event processor for onmousemove
  • onMouseOut(e) event processor for onmouseout
  • onMouseOver(e) event processor for onmouseover or touch, to mark that element as the current element
  • onMouseUp(e) Event processor for onmouseup.
  • onOutEvent()
  • onOverEvent()
  • onSelectStart(e) event processor for onselectevent and ondragevent

Properties

accept
Defined by: dojo/dnd/Source
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

autoSync
Defined by: dojo/dnd/Source
copyOnly
Defined by: dojo/dnd/Source
current
Defined by: dojo/dnd/Container

The DOM node the mouse is currently hovered over

delay
Defined by: dojo/dnd/Source
GC_OFFSET_X
GC_OFFSET_Y
generateText
Defined by: dojo/dnd/Source
horizontal
Defined by: dojo/dnd/Source
isSource
Defined by: dojo/dnd/Source
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)
selfAccept
Defined by: dojo/dnd/Source
selfCopy
Defined by: dojo/dnd/Source
singular
Defined by: dojo/dnd/Selector
skipForm
Defined by: dojo/dnd/Source
withHandles
Defined by: dojo/dnd/Source

Methods

_addItemClass(node,type)
Defined by dojo/dnd/Container

adds a class with prefix "dojoDndItem"

Parameter Type Description
node Node

a node

type String

a variable suffix for a class name

_autoScrollDown(node)
Parameter Type Description
node undefined
_autoScrollUp(node)
Parameter Type Description
node undefined
_calculateCoords(height)

Calculate each position of children

Parameter Type Description
height Boolean
_changeState(type,newState)
Defined by dojo/dnd/Container

changes a named state to new state value

Parameter Type Description
type String

a name of the state to change

newState String

new state

_checkAutoScroll(e)
Parameter Type Description
e undefined
_getChildByEvent(e)
Defined by dojo/dnd/Container

gets a child, which is under the mouse at the moment, or null

Parameter Type Description
e Event

a mouse event

Returns:undefined | null
_legalMouseDown(e)

Checks if user clicked on "approved" items.

Parameter Type Description
e Event
Returns:boolean
_markDndStatus(copy)
Defined by dojo/dnd/Source

changes source's state based on "copy" status

Parameter Type Description
copy undefined
_markTargetAnchor(before)

Assigns a class to the current target anchor based on "before" status

Parameter Type Description
before Boolean
_normalizedCreator(item,hint)
Defined by dojo/dnd/Container

adds all necessary data to the output of the user-supplied creator function

Parameter Type Description
item Container.Item
hint String
Returns:undefined
_removeAnchor()
Defined by dojo/dnd/Selector
Returns:function
_removeItemClass(node,type)
Defined by dojo/dnd/Container

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"]

_removeSelection()
Defined by dojo/dnd/Selector

unselects all items

Returns:function

unselects all items

_stopAutoScroll()
_sumAncestorProperties(node,prop)

Returns the sum of the passed property on all ancestors of node.

Parameter Type Description
node undefined
prop undefined
Returns:number
_unmarkTargetAnchor()

Removes a class of the current target anchor based on "before" status.

checkAcceptance(source,nodes)
Defined by dojo/dnd/Source

checks if the target can accept nodes from this source

Parameter Type Description
source Object

the source which provides items

nodes Array

the list of transferred items

Returns:boolean
clearItems()
Defined by dojo/dnd/Container

removes all data items from the map

copyState(keyPressed,self)
Defined by dojo/dnd/Source

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" key was pressed

self Boolean
Optional

optional flag that means that we are about to drop on itself

Returns:boolean | undefined
creator()
Defined by dojo/dnd/Container

creator function, dummy at the moment

deleteDashedZone()

hide the dashed zone

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/Source

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
getDraggedWidget(node)

Return one or more widget selected during the drag.

Parameter Type Description
node Node
Returns:null
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
insertDashedZone(before)

Insert the dashed zone at the right place

Parameter Type Description
before Boolean
insertNodes(addSelected,data,before,anchor)

Inserts new data items (see Dojo Container's insertNodes method for details).

Parameter Type Description
addSelected Boolean
data Array
before Boolean
anchor Node
Returns:undefined
isAccepted(node)

test if this node can be accepted

Parameter Type Description
node Node
Returns:object
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
setDndItemSelectable(node,isSelectable)

set an item as selectable

Parameter Type Description
node Node
isSelectable Boolean
setIndicatorPosition(e)

set the position of the drop indicator

Parameter Type Description
e Event
Returns:boolean
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

onDndCancel()

Called to cancel the DnD operation.

onDndDrop(source,nodes,copy,target)

Called to finish the DnD operation

Parameter Type Description
source undefined
nodes undefined
copy undefined
target undefined
onDndSourceOver(source)
Defined by: dojo/dnd/Source

topic event processor for /dnd/source/over, called when detected a current source

Parameter Type Description
source Object

the source which has the mouse over it

onDndStart(source,nodes,copy)

Called to initiate the DnD operation.

Parameter Type Description
source Object
nodes Array
copy Object
onDraggingOut()
Defined by: dojo/dnd/Source

called during the active DnD operation, when items are dragged away from this target, and it is not disabled

onDraggingOver()
Defined by: dojo/dnd/Source

called during the active DnD operation, when items are dragged over this target, and it is not disabled

onDrop(source,nodes,copy)
Defined by: dojo/dnd/Source

called only on the current target, when drop is performed

Parameter Type Description
source Object

the source which provides items

nodes Array

the list of transferred items

copy Boolean

copy items, if true, move items otherwise

onDropExternal(source,nodes,copy)
Defined by: dojo/dnd/Source

called only on the current target, when drop is performed from an external source

Parameter Type Description
source Object

the source which provides items

nodes Array

the list of transferred items

copy Boolean

copy items, if true, move items otherwise

onDropInternal(nodes,copy)
Defined by: dojo/dnd/Source

called only on the current target, when drop is performed from the same target/source

Parameter Type Description
nodes Array

the list of transferred items

copy Boolean

copy items, if true, move items otherwise

onMouseDown(e)

Event processor for onmousedown.

Parameter Type Description
e Event
onMouseMove(e)

Event processor for onmousemove

Parameter Type Description
e undefined
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)

Event processor for onmouseup.

Parameter Type Description
e Event
onOutEvent()
onOverEvent()
onSelectStart(e)
Defined by: dojo/dnd/Container

event processor for onselectevent and ondragevent

Parameter Type Description
e Event

mouse event

Error in the documentation? Can’t find what you are looking for? Let us know!