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 HTMLElement

handleDragEnd(e)

Parameters:
Name Type Description
e Event

handleDragEnter(e)

Parameters:
Name Type Description
e Event

handleDragLeave(e) → {*}

Parameters:
Name Type Description
e Event
Returns:
Type
*

handleDragOver(e) → {*}

Parameters:
Name Type Description
e Event
Returns:
Type
*

handleDragStart()

No DOM manipulation in dragstart because of a WONTFIX Chrome bug

handleDrop(e)

Parameters:
Name Type Description
e Event

handleMouseDown(e)

Parameters:
Name Type Description
e Event

handleMouseLeave(e)

Parameters:
Name Type Description
e Event

handleMouseOver(e)

Parameters:
Name Type Description
e Event

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

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

makeDraggable(el, useParentAsDz, excludeElsWithClass)

Parameters:
Name Type Description
el HTMLElement
useParentAsDz *
excludeElsWithClass *

makeDraggableHelper(el)

Parameters:
Name Type Description
el HTMLElement

makePlaceholderFor(element)

Parameters:
Name Type Description
element HTMLElement

makePlaceholderHelper(el)

Parameters:
Name Type Description
el HTMLElement

movePlaceholder(event, dropZone)

Parameters:
Name Type Description
event Event
dropZone *

removePlaceholder()

showPortletLayout(show)

Parameters:
Name Type Description
show *