Members
(constant) tarotMap
Create a hashmap for all tarot cards that can be indexed by card name
(constant) tarotMap
Create a hashmap for all tarot cards that can be indexed by card name
- Source:
Methods
borderHandler()
Handles CSS elements for different selections
- Dynamically creates and deletes borders
- Dynamically make the take photo btn active and inactive
dragonSelected(event)
Handler function for when dragon character is selected.
Functionalities:
- Update clicked stack
- Update borders
- Set LocalStorage
Parameters:
| Name | Type | Description |
|---|---|---|
event |
getTarotCardName(tarotConfig) → {Array.<string>}
Create an array of 22 and parse all the card name from json file
Parameters:
| Name | Type | Description |
|---|---|---|
tarotConfig |
Array.<*> | an array of the tarot cards from json |
Returns:
array contains 22 tarot cards' name
- Type
- Array.<string>
handleWindowSizeChange()
Handles window size change
- Source:
(async) loadCamera()
Opens a live video canvas
pandaSelected(event)
Handler function for when pand character is selected.
Functionalities:
- Update clicked stack
- Update borders
- Set LocalStorage
Parameters:
| Name | Type | Description |
|---|---|---|
event |
takePicture(event)
Handler function for when "Take your own picture" is selected.
Functionalities:
- Update clicked stack
- Update borders
- Set LocalStorage
- Load Camera canvas
Parameters:
| Name | Type | Description |
|---|---|---|
event |
updateButtonVisibility(idx)
Update button visibility - should not show the previous button when on the
first card and should not show the next button on the last card
Parameters:
| Name | Type | Description |
|---|---|---|
idx |
* | index of current card when in mobile mode |
- Source:
updateMobileCard()
Display the current card on the mobile side
- Source: