Options
All
  • Public
  • Public/Protected
  • All
Menu

ContentFlow is a flexible flow written in javascript, which can handle any kind of content. For documentation, see

Hierarchy

  • ContentFlow

Implements

Index

Constructors

constructor

  • Creates a new content flow gallery on the given HTML element.

    Parameters

    • id: string

      ID of the DOM element to use for the content flow gallery.

    • options: Partial<Configuration>

      Options for the content flow gallery.

    Returns ContentFlow

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>
    override

    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

getItem

  • Returns the item at given index.

    override

    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

    override

    Returns number

    The number of items in this content flow gallery.

moveTo

  • Called to scroll to item.

    override

    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.

    override

    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.

    override

    Parameters

    • Optional index: number

      Optinal 0-based index of the item to remove

    Returns HTMLElement

    The removed item node

setConfig

Generated using TypeDoc