VisiOmatic web client

Class

Sidebar

Extends
  • leaflet.Control

Create a new sidebar.

Parameters

  • options object <optional>

    Options.

    Properties

    • title string <optional>
      'Toggle advanced menu'

      Title of the panel.

    • position 'left' | 'right' <optional>
      'left'

      Position of the sidebar.

    • collapsed boolean <optional>
      true

      Sidebar initially in closed position?

    • forceSeparateButton boolean <optional>
      false

      Sidebar button separate from zoom control?

Returns

  • Sidebar

    Instance of a sidebar.

Source

Methods

privatestatic

_addButton(titleopt, className, container) → {object}

Add a button

Parameters

  • title string <optional>

    Title of the button.

  • className string

    Class name of the button.

  • container object

    Element containing the button.

Returns

  • object

    New link (button) element.

Source

static

addTab(id, className, titleopt, content, sideClassopt) → {object}

Add sidebar tab and its pane.

Parameters

  • id string

    Element id of the tab pane (and part of the tab id).

  • className string

    Class name of the tab.

  • title string <optional>

    Title of the tab.

  • content object

    Element containing the tab content.

  • sideClass string <optional>

    Class name of an additional element which may be opened or close in parallel to the tab.

Returns

  • object

    The newly created tab pane.

Source

static

addTo(map) → {Sidebar}

Add this sidebar to the specified map.

Parameters

  • map L.Map

    Leaflet map the control is to be added to.

Returns

  • Sidebar

    The sidebar (this).

Source

static

open(id) → {Sidebar}

Open sidebar (if necessary) and show the specified tab.

Parameters

  • id string

    The id of the tab to show (without the # character)

Returns

  • Sidebar

    The sidebar (this).

Source

static

removeFrom(map) → {Sidebar}

Remove this sidebar from the map.

Parameters

  • map L.Map

    Leaflet map the control had been added to.

Returns

  • Sidebar

    The sidebar (this).

Source