-
<inner> Context(options) → {Object}
-
Creates a new drag and drop context.
The following attributes are supported in the options object that is
passed to this function:
`dropEffect`
The dropEffect attribute controls the drag-and-drop feedback that
the user is given during a drag-and-drop operation. If the
`dropEffect` value is set to "copy", for example, the user agent
may rendered the drag icon with a "+" (plus) sign.
The supported values are "none", "copy", "link", or "move". All
other values will be ignored.
`element`
The element on which dragging was initiated on. If the drag and
drop operation is a moving operation, this element will be
relocated into the range boundary at the point at which the drop
event is fired.
If the drag and drop operation is a copying operation, then this
attribute should a reference to a deep clone of the element on
which dragging was initiated.
`data`
A tuple describing the data that will be set to the drag data
store. See:
http://www.whatwg.org/specs/web-apps/current-work/multipage/dnd.html#drag-data-store
Parameters:
Name |
Type |
Description |
options |
Object
|
|
- Source:
Returns:
-
Type
-
Object
-
<inner> handle(alohaEvent) → {Object}
-
Processes drag and drop events operations.
Parameters:
Name |
Type |
Description |
alohaEvent |
Object
|
|
- Source:
Returns:
-
Type
-
Object
-
<inner> isDraggable(node) → {boolean}
-
Whether or not the given node is draggable.
In an attempt to follow the implementation on most browsers, text
selections, IMG elements, and anchor elements with an href attribute are
draggable by default.
Parameters:
Name |
Type |
Description |
node |
Element
|
|
- Source:
Returns:
-
Type
-
boolean
-
<inner> moveNode(range, node)
-
Moves the given node, into the given range.
Parameters:
Name |
Type |
Description |
range |
Range
|
|
node |
Element
|
|
- Source: