dojox/mdnd/adapter/DndFromDojo (version 1.10)

Summary

Allow communication between Dojo dnd items and DojoX D&D areas

Usage

var foo = new DndFromDojo();
dojox/mdnd/adapter/DndFromDojo

Property Summary

Method Summary

  • _getHoverArea(coords) Get a D&D dojoX area as a DOM node positioned under a specific point.
  • _resetAvatar() Function executed in onDndSource function to set the avatar acceptance according to the dojox DnD AreaManager Acceptance.
  • isAccepted(node,accept) Check if a dragNode is accepted into a dojo target.
  • subscribeDnd() Subscribe to somes topics of dojo drag and drop.
  • unsubscribeDnd() Unsubscribe to some topics of dojo drag and drop.

Event Summary

  • onDndSource(source) Called when the mouse enters or exits of a source dojo.
  • onDragEnter() Occurs when the user drages an DOJO dnd item inside a D&D dojoX area.
  • onDragExit() Occurs when the user leaves a D&D dojoX area after dragging an DOJO dnd item over it.
  • onDragStart(source,nodes,copy) Occurs when the "/dnd/start" topic is published.
  • onDrop(source,nodes,copy) Occurs when the user leaves a D&D dojox area after dragging an DOJO dnd item over it.
  • onDropCancel() Occurs when the "/dnd/cancel" topic is published.
  • onMouseMove(e) Occurs when the user moves the mouse.

Properties

_areaManager

Reference to the current DojoX Dnd Manager

_currentArea

The current Area on mouse over

_dojoManager
_moveHandler

The handler of mouse connection

_oldArea

The old area the mouse has passed over

_subscribeHandler

The list of dojo dnd topics

dropIndicatorSize

size by default of dropIndicator (display only into a D&D Area)

Methods

_getHoverArea(coords)

Get a D&D dojoX area as a DOM node positioned under a specific point.

Parameter Type Description
coords Object

Object containing the coordinates x and y (mouse position)

_resetAvatar()

Function executed in onDndSource function to set the avatar acceptance according to the dojox DnD AreaManager Acceptance. It is used when The mouse exit a source/target dojo or if the dragged node is not accepted in dojo source / target.

isAccepted(node,accept)

Check if a dragNode is accepted into a dojo target.

Parameter Type Description
node Node

The dragged node.

accept Object

Object containing the type accepted for a target dojo.

Returns:any | boolean

true if the dragged node is accepted in the target dojo.

subscribeDnd()

Subscribe to somes topics of dojo drag and drop.

unsubscribeDnd()

Unsubscribe to some topics of dojo drag and drop.

Events

onDndSource(source)

Called when the mouse enters or exits of a source dojo.

Parameter Type Description
source Object

the dojo source/target

onDragEnter()

Occurs when the user drages an DOJO dnd item inside a D&D dojoX area.

onDragExit()

Occurs when the user leaves a D&D dojoX area after dragging an DOJO dnd item over it.

onDragStart(source,nodes,copy)

Occurs when the "/dnd/start" topic is published.

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

onDrop(source,nodes,copy)

Occurs when the user leaves a D&D dojox area after dragging an DOJO dnd item over it.

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

onDropCancel()

Occurs when the "/dnd/cancel" topic is published.

onMouseMove(e)

Occurs when the user moves the mouse.

Parameter Type Description
e DOMEvent

the DOM event

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