Members
UCASDesignFramework
UCASDesignFramework
- Source:
UCASDesignFramework
- Source:
UCASDesignFramework
UCASDesignFramework
UCASDesignFramework
Create global UCASDesignFramework object if it doesn't already exist
- Source:
UCASDesignFramework
UCASUtilities
UCASUtilities
- Source:
Methods
getAvatar(userName) → {string}
Creates a user avatar
Parameters:
Name | Type | Description |
---|---|---|
userName |
string | The name of the user |
- Source:
Returns:
- The svg image for use as a background
- Type
- string
lockPosition(hide)
Lock the page position.
Parameters:
Name | Type | Description |
---|---|---|
hide |
Boolean | hide the main content. |
- Source:
mapRange(number, from, to, round) → {number}
Map a value to a specific range.
Parameters:
Name | Type | Description |
---|---|---|
number |
number | The number being mapped |
from |
array | The range being mapped from |
to |
array | The range being mapped to |
round |
boolean | Whether to round to the nearest whole number |
- Source:
Returns:
- The mapped number
- Type
- number
mapRange(number, from, to, round) → {number}
Map a value to a specific range.
Parameters:
Name | Type | Description |
---|---|---|
number |
number | The number being mapped |
from |
array | The range being mapped from |
to |
array | The range being mapped to |
round |
boolean | Whether to round to the nearest whole number |
- Source:
Returns:
- The mapped number
- Type
- number
sanitize(string) → {string}
Sanitizes a string.
Parameters:
Name | Type | Description |
---|---|---|
string |
string | The string to be sanitised |
- Source:
Returns:
- The sanitized string
- Type
- string
sanitize(string) → {string}
Sanitizes a string.
Parameters:
Name | Type | Description |
---|---|---|
string |
string | The string to be sanitised |
- Source:
Returns:
- The sanitized string
- Type
- string
setUser(newUserInfo)
Update or set the global userInfo object.
Technically the only required property is UID, the rest will be
backfilled with defaults.
Parameters:
Name | Type | Description |
---|---|---|
newUserInfo |
object | See updateUserMenu |
- Source:
updateUserMenuUI()
Inserts a personalised user menu.
This method will be called from the Gigya handler file and will be passed
a validated user object.
- Source: