Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface for the content flow class that represents an instantiated content flow gallery. It is responsible for controlling the gallery.

Hierarchy

  • ContentFlow

Implemented by

Index

Properties

Browser

Browser: Record<BrowserKind, boolean>

Information about the current browser environment. For each browser, the value is true when the current browser is of that kind, and false otherwise.

Container

Container: HTMLElement

DOM element of the element with the .ContentFlow class

Flow

DOM element of the element with the .flow class

Scrollbar

Scrollbar: HTMLElement

DOM element of the element with the .scrollbar class

Slider

Slider: HTMLElement

DOM element of the element with the .slider class

conf

The current configuration for this content flow gallery.

items

The list of items that are currently in this content flow gallery.

Methods

addItem

  • addItem(element: HTMLElement, index: number | "start" | "end" | "first" | "last"): number
  • Called to add a new item 'element' to the flow at the position index. The element has to be a valid item element. So it must have at least this HTML strucutre:

    <div class="item">
    <img class="content" src="url/to/image"/>
    </div>

    Parameters

    • element: HTMLElement

      An element to add to this content flow gallery.

    • index: number | "start" | "end" | "first" | "last"

      0-based index or position where to add the item.

    Returns number

    0-based index position of added item.

getActiveItem

  • Called to get the currently active item.

    Returns undefined | ContentFlowItem

    The currently active item.

getItem

  • Returns the item at given index.

    Parameters

    • index: number

      0-based index of an item to get.

    Returns undefined | ContentFlowItem

getNumberOfItems

  • getNumberOfItems(): number
  • Called to get the number of items currently in the flow

    Returns number

    The number of items in this content flow gallery.

moveTo

  • Called to scroll to item.

    Parameters

    • item: number | PositionKeyword | ContentFlowItem

      Item to scroll to. If a number and the fractional part is 0, interpret the value as the 0-index of an item. If a number with a non-zero fractional part, interpret this value as the position to scroll to.

    Returns void

resize

  • resize(): void
  • Called to reinitialize the size of the flow items, after the size of the flow has changed. Is called if window is resized.

    Returns void

rmItem

  • Called to remove an item from the flow. If the optional parameter index is given, the element at the index position will be removed. Otherwise, the currently active item will be removed.

    Parameters

    • Optional index: number

      Optinal 0-based index of the item to remove

    Returns HTMLElement

    The removed item node

setConfig

  • Called to set options after object creation

    Parameters

    Returns void

Generated using TypeDoc