Breadcrumb

Breadcrumb

Source:
Parameters:
NameTypeDescription
elementHTMLElement

DOM element for component instantiation and scope

optionsObject
Properties
NameTypeDescription
ellipsisButtonSelectorString
ellipsisSelectorString
segmentSelectorString
expandableItemsSelectorString
staticItemsSelectorString
onPartialExpandfunction
onFullExpandfunction
attachClickListenerBoolean

Classes

Breadcrumb

Methods

(async) check()

Description:
  • Apply partial or full expand.

Source:

computeVisibilityMap()

Description:
  • Measure/evaluate which elements can be displayed and toggle those who don't fit.

Source:

destroy()

Description:
  • Destroy component.

Source:

handleClickOnEllipsis()

Description:
  • Invoke event listener attached on the elipsis. Traslates to a full expand.

Source:

handleFullExpand()

Description:
  • Display all elements.

Source:

handlePartialExpand(visibilityMap)

Source:
Parameters:
NameTypeDescription
visibilityMapObject

handleResize()

Description:
  • Trigger events on resize

Source:

hideEllipsis()

Description:
  • Removes the elipsis element and its event listeners.

Source:

init()

Description:
  • Initialise component.

Source:

showAllItems()

Description:
  • Show all expandable elements.

Source:

(static) autoInit(root) → {Breadcrumb}

Source:
Parameters:
NameTypeDescription
rootHTMLElement

DOM element for component instantiation and scope

Returns:

An instance of Breadcrumb.

Type
Breadcrumb