Noodle Help Site

new Drag() → {Drag}

Drag and drop controller
Returns:
Type
Drag

Methods

canDrop()

True if one of the following: 1. Dragging element's parent is the drop zone that fired the dragover event. 2. Dragging element's parent is some drop zone that fired the dragover event whom is a sibling of the dragging element's parent. 3. If non sibling drop zones, matches the dragging element's parent id prefix to the dragover event's id prefix. 4. If non sibling drop zones, matches the dragging element's parent class to the dragover event's class. 5. Customizable criteria is met.

canDropCustom() → {*}

Returns:
Type
*

canDropCustom()

Override on init with additional drop acceptance criteria.

dropReaction()

getIntendedDragNode(el)

Parameters:
Name Type Description
el *

handleDragEnd(e)

Parameters:
Name Type Description
e *

handleDragEnter(e)

Parameters:
Name Type Description
e *

handleDragLeave(e) → {*}

Parameters:
Name Type Description
e *
Returns:
Type
*

handleDragOver(e) → {*}

Parameters:
Name Type Description
e *
Returns:
Type
*

handleDragStart()

No DOM manipulation in dragstart because of a WONTFIX Chrome bug

handleDrop(e)

Parameters:
Name Type Description
e *

handleMouseDown(e)

Parameters:
Name Type Description
e *

handleMouseLeave(e)

Parameters:
Name Type Description
e *

handleMouseOver(e)

Parameters:
Name Type Description
e *

init(doc, selectors, dropFunc, dragHandleIsNested, useParentAsDz, excludeElsWithClass)

Parameters:
Name Type Description
doc *
selectors *
dropFunc *
dragHandleIsNested *
useParentAsDz *
excludeElsWithClass *

makeDraggable(el, useParentAsDz, excludeElsWithClass)

Parameters:
Name Type Description
el *
useParentAsDz *
excludeElsWithClass *

makeDraggableHelper(el)

Parameters:
Name Type Description
el *

makePlaceholderFor(element)

Parameters:
Name Type Description
element *

makePlaceholderHelper(el)

Parameters:
Name Type Description
el *

movePlaceholder(event, dropZone)

Parameters:
Name Type Description
event *
dropZone *

removePlaceholder()

showPortletLayout(show)

Parameters:
Name Type Description
show *