The class for managing the pages of the application. It handles the setups and visibility of the different pages

Constructors

Properties

current: Page
pages: {
    aboutPage: AboutPage;
    cheatSheetPage: CheatSheetPage;
    editorPage: EditorPage;
    kirchhoffPage: KirchhoffPage;
    landingPage: LandingPage;
    loadingPage: LoadingSomethingPage;
    loadingPyodidePage: LoadingPyodidePage;
    magneticPage: MagneticPage;
    navigation: NavigationPage;
    selectPage: SelectPage;
    settingsPage: SettingsPage;
    stepwisePage: StepwisePage;
    toolPage: ToolsPage;
    wheatstonePage: WheatstonePage;
}
timeout: number

Accessors

  • get allPages(): Page[]

    return all pages that are registered in PageManager.pages

    Returns Page[]

  • get pagesToSetup(): Page[]

    Returns Page[]

  • get requestID(): int

    Returns int

Methods

  • call afterPyodideLoaded on all registered Pages in PageManager.pages

    Returns void

  • Parameters

    • newPage: Page

      {Page} the page that shall be displayed

    • force: boolean = false

      {boolean} force the page change, if page is already set

    • history: boolean = true

      {boolean} adding the page to the history

    Returns Promise<boolean>

  • Parameters

    • newPage: Page

      {Page} the page that shall be displayed

    • force: boolean = false

      {boolean} force the page change, if page is already set

    Returns void

  • method used to enable the tooltips on the tools page (todo: see if this can be moved to live tracking)

    Returns void

  • return an HTML element that is a thin line and can be used to separate content on pages

    Parameters

    • id: string

      {string} unique id for the element in the dom, is concatenated like this: "settings-divider-" + id

    Returns HTMLHRElement

  • method called if an error is produced in the code

    Returns void

  • Parameters

    • page: Page

      {Page}

    • requestID: int

      {int} the id of the page change request, necessary to abort showing the page if another page change was requested in the meantime

    • intervall: int = 100

      {int}

    Returns Promise<any>

  • Parameters

    • checkFn: Function

      {function}

    • requestID: int

      {int} the id of the page change request, necessary to abort showing the page if another page change was requested in the meantime

    • interval: int = 100

      {int}

    Returns Promise<any>

  • uses window.matchMedia to determine the browser language and set the page language accordingly

    Returns void

  • Parameters

    • startPage: Page = ...

    Returns Promise<void>

  • Returns Promise<void>

  • Parameters

    • newPage: Page

      {Page} the page that shall be displayed

    • history: boolean = true

      {boolean} adding the page to the history

    Returns void

  • slide out the page to the left

    Parameters

    • fade: int = 300

      {int} time the page slides out

    • hideOffset: int = 500

      {int} time that is waited to hide the page after fade is done

    Returns void

  • update the color of each registered page in PageManager.pages

    Returns void

  • update the language of each registered page in PageManager.pages

    Returns Promise<void>

  • Parameters

    • newOpacity: number

      {number} a number between 0 and 1, set opacity to this value

    • page: Page

      {Page} the page the opacity shall be set of, can be null if all is true

    • all: boolean = false

      {boolean} if true opacity of all pages is set to newOpacity, page value is ignored

    Returns void