Namespace: $TreeDnDHelper

$TreeDnDHelper

Factory $TreeDnDHelper

Source:

Methods


<static> closestByAttr(element, attr)

Find element closest by attribute

Parameters:
Name Type Description
element DOMElement
attr string | function
Source:
Returns:
Type
DOMElement

<static> dragInfo(scope)

Get drag info

Parameters:
Name Type Description
scope $scope
Source:
Returns:
Type
object

<static> eventObj(e)

Get event's object

Parameters:
Name Type Description
e object
Source:
Returns:
Type
object | null

<static> height(element)

Get element's height

Parameters:
Name Type Description
element DOMElement
Source:
Returns:
Type
number

<static> isTreeDndDroppable(element)

Is tree droppable

Parameters:
Name Type Description
element DOMElement
Source:
Returns:
Type
boolean

<static> isTreeDndNode(element)

Is type tree node

Parameters:
Name Type Description
element DOMElement
Source:
Returns:
Type
boolean

<static> isTreeDndNodeHandle(element)

Is tree node handle (element to call event drag)

Parameters:
Name Type Description
element DOMElement
Source:
Returns:
Type
boolean

<static> isTreeDndNodes(element)

Is tree nodes (container)

Parameters:
Name Type Description
element DOMElement
Source:
Returns:
Type
boolean

<static> nodrag(targetElm)

Status is no draggable

Parameters:
Name Type Description
targetElm DOMElement
Source:
Returns:
Type
boolean

<static> offset(element)

Get element's offset

Parameters:
Name Type Description
element DOMElement
Source:
Returns:
Type
Object

<static> positionMoved(e, pos, firstMoving)

Get position moved

Parameters:
Name Type Description
e Event
pos ElementPosition
firstMoving bool
Source:
Returns:
Type
object

<static> positionStarted(e, target)

Get position started of element drag or drop

Parameters:
Name Type Description
e Event
target DOMElement
Source:
Returns:
Type
ElementPosition

<static> replaceIndent(scope, element, indent, attr)

Replace with indent

Parameters:
Name Type Description
scope $scope
element DOMElement
indent number
attr string
Source:

<static> width(element)

Get element's width

Parameters:
Name Type Description
element DOMElement
Source:
Returns:
Type
number