Options
All
  • Public
  • Public/Protected
  • All
Menu

Control used to choose the current floor to view

Hierarchy

  • Control
    • FloorsControl

Index

Constructors

constructor

  • new FloorsControl(floors: string[], defaultFloor: string, setFloor: (floor: string) => void, options?: ControlOptions): FloorsControl
  • Parameters

    • floors: string[]
    • defaultFloor: string
    • setFloor: (floor: string) => void
        • (floor: string): void
        • Parameters

          • floor: string

          Returns void

    • Optional options: ControlOptions

    Returns FloorsControl

Properties

Private Readonly controlElement

controlElement: HTMLElement

Private Readonly floorControls

floorControls: Map<string, HTMLElement>

options

options: ControlOptions

Methods

addTo

  • Parameters

    • map: Map

    Returns FloorsControl

getContainer

  • getContainer(): undefined | HTMLElement
  • Returns undefined | HTMLElement

getPosition

  • getPosition(): ControlPosition
  • Returns ControlPosition

initialize

  • initialize(options: ControlOptions): void
  • Parameters

    • options: ControlOptions

    Returns void

onAdd

  • onAdd(_map: Map): HTMLElement
  • Parameters

    • _map: Map

    Returns HTMLElement

Optional onRemove

  • onRemove(map: Map): void
  • Parameters

    • map: Map

    Returns void

remove

  • Returns FloorsControl

setFloor

  • setFloor(oldFloorNumber: string, newFloorNumber: string): void
  • Set the styling of the control to reflect a new floor being set

    Parameters

    • oldFloorNumber: string
    • newFloorNumber: string

    Returns void

setPosition

  • Parameters

    • position: ControlPosition

    Returns FloorsControl

Static addInitHook

  • addInitHook(initHookFn: () => void): any
  • addInitHook(methodName: string, ...args: any[]): any
  • Parameters

    • initHookFn: () => void
        • (): void
        • Returns void

    Returns any

  • Parameters

    • methodName: string
    • Rest ...args: any[]

    Returns any

Static Private createElement

  • createElement(floors: string[], defaultFloor: string, setFloor: (floor: string) => void): [HTMLElement, Map<string, HTMLElement>]
  • Create the HTML element representing the control

    Parameters

    • floors: string[]
    • defaultFloor: string
    • setFloor: (floor: string) => void
        • (floor: string): void
        • Parameters

          • floor: string

          Returns void

    Returns [HTMLElement, Map<string, HTMLElement>]

    [controlElement, floorControls] controlElement is the HTML element representing the control. floorControls is a mapping from room number to the part of controlElement that changes when the floor changes.

Static Private deselectControl

  • deselectControl(control: HTMLElement): void
  • Parameters

    • control: HTMLElement

    Returns void

Static extend

  • extend<T>(props: T): new (...args: any[]) => T & typeof Control
  • Type parameters

    • T: object

    Parameters

    • props: T

    Returns new (...args: any[]) => T & typeof Control

Static include

  • include(props: any): any
  • Parameters

    • props: any

    Returns any

Static mergeOptions

  • mergeOptions(props: any): any
  • Parameters

    • props: any

    Returns any

Static Private selectControl

  • selectControl(control: HTMLElement): void
  • Parameters

    • control: HTMLElement

    Returns void

Generated using TypeDoc