Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Seatchart

Hierarchy

  • Seatchart

Index

Constructors

  • Creates a seatchart.

    Parameters

    • element: HTMLElement

      Html element that will contain the Seatchart.

    • options: Options

      Seatchart options.

    Returns Seatchart

Properties

element: HTMLElement

Element passed on creation to contain the Seatchart.

options: Options

Options passed on creation to configure the Seatchart.

Methods

  • addEventListener<T>(type: T, listener: (e: Events[T]) => void): void
  • Adds an event listener.

    Type parameters

    Parameters

    • type: T

      Event type.

    • listener: (e: Events[T]) => void

      Listener function called when the given event occurs.

    Returns void

  • clearCart(): void
  • Unselects all seats and removes them from the cart.

    Returns void

    The total price.

  • Gets a reference to the cart array.

    Returns SeatInfo[]

    An array containing selected seats.

  • getCartTotal(): number
  • Gets the total price of the selected seats.

    Returns number

    The total price.

  • removeEventListener<T>(type: T, listener: (e: Events[T]) => void): void
  • Removes an event listener.

    Type parameters

    Parameters

    • type: T

      Event type.

    • listener: (e: Events[T]) => void

      Listener to remove.

    Returns void

  • setSeat(index: SeatIndex, seat: Partial<{ label: string; state: SeatState; type: string }>): void
  • Sets seat info.

    Parameters

    • index: SeatIndex

      Index of the seat to update.

    • seat: Partial<{ label: string; state: SeatState; type: string }>

      An object containing the new seat info.

    Returns void

Generated using TypeDoc