Home Reference Source
public class | source

Header

Extends:

react~Component → Header

React component class for the header

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public

buildSettingsArr: array: *

Flatten the sceneSettings from props (object) into an array for comparason

public

clear: *

resets the current scene

public

closes the snackbar that displays the message from render

public

getProjectId: *: *

This function will determine which projectId to use when saving.

public

close the collection drawer

public

Handles when collection is deleted

public

toggles the load collection drawer

public

toggles the load courses drawer

public

This sets the components current state to the input from the scene description form

public

This function handles when the user wants to toggle the logging menu

public

This sets the components current state to the input from the scene name form

public

toggles the load project drawer

public

toggles the load reference drawer

public

handeRender gets the information from Ace Editor and calls the action: render()

public

When the user clicks save it will upload the information to Firebase

public

forces save drawer closed

public

forces save drawer closed

public

toggles the save drawer

public

toggles the load tour

public

toggles the load welcome menu

public

Return a collection component

public

login: *

The login function runs when the user click to login of the application.

public

This function produces the DOM elements to display logging functionality

public

logout: *

The logout function runs when the user click to logout of the application.

public

Refresh token when the time expires, update the token, and set the refresh time again

public
public

Display the snackbar that displays the message from render

public

creates the save drawer

public

This function produces the form for inputting the scene's name and description

public

Google auth token object has a expiration time that needed to be refresh after certain time period This function set the timeout and will refresh the token after it reach the time

public

settingsEqual(newSettings: array): boolean: *

Compare two arrays of setting and determine whether is the settings are equal or not

public

spinner: *: *

public

state: {"logMenuOpen": *, "availProj": *, "sampleProj": *, "collectionOpen": *, "projectsOpen": *, "projectTab": string, "snackOpen": *, "lastMsgTime": *, "anchorEl": *, "navAwayModal": *, "needsNewId": *, "spinnerOpen": *, "referenceOpen": *, "coursesOpen": *, "tourOpen": *, "welcomeOpen": *, "updateCollection": *, "fetchCollection": *, "socket": *, "savedSettings": *, "googleUser": *}

Method Summary

Public Methods
public

When the component is done rendering, we want to:

public

When we update, check to see if there is a new message by comparing the local state to props.message.time

public

Removes listener for real time sync process

public

handleKeyDown(e: event)

Catches certain keyboard shortcuts

public

You can pass functions into this in order to have multiple setState/state actions dispatched within an event handler Currently only used for render button

public

render(): *

creates the header and links the buttons

Public Constructors

public constructor() source

Public Members

public buildSettingsArr: array: * source

Flatten the sceneSettings from props (object) into an array for comparason

Return:

array

Array of the scene settings

public clear: * source

resets the current scene

public closeSnackBar: * source

closes the snackbar that displays the message from render

public getProjectId: *: * source

This function will determine which projectId to use when saving.

Return:

*

projectId

public handleCollectionClose: * source

close the collection drawer

public handleCollectionDelete: * source

Handles when collection is deleted

public handleCollectionToggle: * source

toggles the load collection drawer

public handleCoursesToggle: * source

toggles the load courses drawer

public handleDescChange: * source

This sets the components current state to the input from the scene description form

public handleLogClick: * source

This function handles when the user wants to toggle the logging menu

public handleNameChange: * source

This sets the components current state to the input from the scene name form

public handleProjectToggle: * source

toggles the load project drawer

public handleReferenceToggle: * source

toggles the load reference drawer

public handleRender: * source

handeRender gets the information from Ace Editor and calls the action: render()

public handleSave: * source

When the user clicks save it will upload the information to Firebase

public handleSaveClose: * source

forces save drawer closed

public handleSaveOpen: * source

forces save drawer closed

public handleSaveToggle: * source

toggles the save drawer

public handleTourToggle: * source

toggles the load tour

public handleWelcomeToggle: * source

toggles the load welcome menu

public loadCollection: * source

Return a collection component

public login: * source

The login function runs when the user click to login of the application.

public loginBtn: * source

This function produces the DOM elements to display logging functionality

public logout: * source

The logout function runs when the user click to logout of the application.

public refreshToken: * source

Refresh token when the time expires, update the token, and set the refresh time again

public renameScene: * source

public renderSnackBar: * source

Display the snackbar that displays the message from render

public saveDrawer: * source

creates the save drawer

public sceneName: * source

This function produces the form for inputting the scene's name and description

public setRefreshTime(time: number): * source

Google auth token object has a expiration time that needed to be refresh after certain time period This function set the timeout and will refresh the token after it reach the time

public settingsEqual(newSettings: array): boolean: * source

Compare two arrays of setting and determine whether is the settings are equal or not

Return:

boolean

If settings are equal or not

public spinner: *: * source

Return:

*

Return a elements with spinner like effects if the spinnerOpen is true Use for when saving or loading a scene

public state: {"logMenuOpen": *, "availProj": *, "sampleProj": *, "collectionOpen": *, "projectsOpen": *, "projectTab": string, "snackOpen": *, "lastMsgTime": *, "anchorEl": *, "navAwayModal": *, "needsNewId": *, "spinnerOpen": *, "referenceOpen": *, "coursesOpen": *, "tourOpen": *, "welcomeOpen": *, "updateCollection": *, "fetchCollection": *, "socket": *, "savedSettings": *, "googleUser": *} source

Public Methods

public componentDidMount() source

When the component is done rendering, we want to:

public componentDidUpdate() source

When we update, check to see if there is a new message by comparing the local state to props.message.time

public componentWillUnmount() source

Removes listener for real time sync process

public handleKeyDown(e: event) source

Catches certain keyboard shortcuts

Params:

NameTypeAttributeDescription
e event

event from the keystroke.

public postpone(f: function) source

You can pass functions into this in order to have multiple setState/state actions dispatched within an event handler Currently only used for render button

Params:

NameTypeAttributeDescription
f function

Function to call after the timeout

public render(): * source

creates the header and links the buttons

Return:

*