Class: PageManager

PageManager()

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

Constructor

new PageManager()

Source:

Members

allPages

return all pages that are registered in PageManager.pages
Source:

current :Page

Type:
Source:

Methods

afterPyodideLoaded()

call afterPyodideLoaded on all registered Pages in PageManager.pages
Source:

(async) changePage(newPage, force, history)

Parameters:
Name Type Default Description
newPage Page the page that shall be displayed
force boolean false force the page change, if page is already set
history boolean true adding the page to the history
Source:

changePageAnimated(newPage, force)

Parameters:
Name Type Default Description
newPage Page the page that shall be displayed
force boolean false force the page change, if page is already set
Source:

enableTooltips()

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

getPageDivider(id) → {HTMLHRElement}

return an HTML element that is a thin line and can be used to separate content on pages
Parameters:
Name Type Description
id string unique id for the element in the dom, is concatenated like this: "settings-divider-" + id
Source:
Returns:
Type
HTMLHRElement

onError()

method called if an error is produced in the code
Source:

pageReady(page, intervall)

Parameters:
Name Type Default Description
page Page
intervall int 100
Source:

ready(checkFn, interval)

Parameters:
Name Type Default Description
checkFn function
interval int 100
Source:

setColorScheme()

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

(async) setup(startPage)

Setup simpliPFy.org
Parameters:
Name Type Description
startPage Page
Source:

slideOut(fade, hideOffset)

slide out the page to the left
Parameters:
Name Type Default Description
fade int 300 time the page slides out
hideOffset int 500 time that is waited to hide the page after fade is done
Source:

updateColor()

update the color of each registered page in PageManager.pages
Source:

(async) updateLang()

update the language of each registered page in PageManager.pages
Source:

updatePageOpacity(newOpacity, page, all)

Parameters:
Name Type Default Description
newOpacity number a number between 0 and 1, set opacity to this value
page Page the page the opacity shall be set of, can be null if all is true
all boolean false if true opacity of all pages is set to newOpacity, page value is ignored
Source: