Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "tours"

Index

Variables

Let current

current: ITour

The currently active Tour

Functions

Const addTours

  • addTours(tours: ITour[]): void
  • Register tours that can be started later

    Parameters

    Returns void

Const done

  • done(tour?: ITour): void
  • Reset current to null and unmount the .mw-tours node

    Parameters

    • Default value tour: ITour = current

      The tour to move, defaults to current

    Returns void

Let getTargetElement

  • Get the target element for the provided step. No default implementation is provided

    Parameters

    Returns any

Const move

  • move(tour?: ITour, index: any): void
  • Move the currentStep of the tour to the provided index and re-render

    Parameters

    • Default value tour: ITour = current

      The tour to move, defaults to current

    • index: any

    Returns void

Const next

  • next(tour?: ITour): void
  • Increment the currentStep of the tour. If the currentStep before the incrementing is the last step then call done

    Parameters

    • Default value tour: ITour = current

      The tour to progress, defaults to current

    Returns void

Const previous

  • previous(tour?: ITour): void
  • Decrement the currentStep of the tour

    Parameters

    • Default value tour: ITour = current

      The tour to progress, defaults to current

    Returns void

Const refresh

  • refresh(tour?: ITour): void
  • Either re-render the current step, or move through the tour until a matching target node is found, or if no target nodes can be found unmount the .mw-tours node

    Parameters

    • Default value tour: ITour = current

      The tour to move, defaults to current

    Returns void

Const render

  • render(tour?: ITour): void
  • Re-render the tour in the .mw-tours container

    Parameters

    • Default value tour: ITour = current

      The tour to move, defaults to current

    Returns void

Const start

  • start(id: string, containerSelector: string, flowKey: string, getElement?: function): ITour
  • Kick off a tour and render the first step

    Parameters

    • id: string

      Id of the Tour to start

    • containerSelector: string

      Selector for the top level container that the .mw-tours container will be appended to

    • flowKey: string
    • Optional getElement: function

      Function that provides the target node / element that step should be rendered next to

    Returns ITour

Generated using TypeDoc