Home Reference Source
import {UIConfigurator} from 'guide4you/src/configurators/UIConfigurator.js'
public class | source

UIConfigurator

This class configures the UI of a map according to its mapconfig

Static Method Summary

Static Public Methods
public static

fixUrls(css: *, cssPath: *): string

Fixes all urls in the css string to the right path

public static

templateCSS(css: string, colors: Color[]): string

Fill the given css String with the rigth colors

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public
public
public
Private Members
private
private
private

Counts how many cssFiles are getting loaded

Method Summary

Public Methods
public

applyLayout(layout: *)

public
public
public

Loads the from cssFile the given conf (if any is given) and inserts into a style tag in the head of the document

Private Methods
private

initialize_(mapConfigCopy: MapConfig)

This functions is called the first time the configureUI function is called

Static Public Methods

public static fixUrls(css: *, cssPath: *): string source

Fixes all urls in the css string to the right path

Params:

NameTypeAttributeDescription
css *
cssPath *

Return:

string

public static templateCSS(css: string, colors: Color[]): string source

Fill the given css String with the rigth colors

Params:

NameTypeAttributeDescription
css string
colors Color[]

Return:

string

Public Constructors

public constructor(map: G4UMap) source

Params:

NameTypeAttributeDescription
map G4UMap

Public Members

public controlFactory: * source

public cssFile_: * source

public handleMobileChange__: * source

Private Members

private initialized_: boolean source

private map_: G4UMap source

private pending_: number source

Counts how many cssFiles are getting loaded

Public Methods

public applyLayout(layout: *) source

Params:

NameTypeAttributeDescription
layout *

public configureUI() source

public getHandleMobileChange_(): * source

Return:

*

public loadCSS(conf: MapConfig): Promise source

Loads the from cssFile the given conf (if any is given) and inserts into a style tag in the head of the document

Params:

NameTypeAttributeDescription
conf MapConfig

Return:

Promise

Private Methods

private initialize_(mapConfigCopy: MapConfig) source

This functions is called the first time the configureUI function is called

Params:

NameTypeAttributeDescription
mapConfigCopy MapConfig