Constructor
new MapHelpPanel()
- Since:
- Source:
Extends
Members
className :string
The HTML classes to use for this view's element
Type:
- Source:
feedbackText :string
Text to show in the feedback section
Type:
- Source:
navHelpTemplate :function
The template to use to show the navigation instructions
Type:
- Source:
sections :Array.<Object>
The sections to show in the help panel
Type:
Properties:
Name |
Type |
Description |
id |
string
|
The id of the section |
title |
string
|
The title of the section |
render |
string
|
The name of the method to call to render
the section. The method will be passed the container within which to
render the section. It should return the container element with the
section added. Methods will be called with the view as the context. |
- Source:
showFeedback :boolean
Set to false to hide the feedback section
Type:
- Default Value:
- Source:
showNavHelp :boolean
Set to false to hide the navigation instructions section
Type:
- Default Value:
- Source:
type :string
The type of View this is
Type:
- Source:
Methods
hideSection(sectionEl, buttonElopt)
Hides a section by adding the hidden class, and removes the active
class from the button if one is provided
Parameters:
Name |
Type |
Attributes |
Description |
sectionEl |
HTMLElement
|
|
The section element to hide |
buttonEl |
HTMLElement
|
<optional>
|
The button element to remove the
active class from |
- Source:
initialize(options)
Initializes the MapHelpPanel
Parameters:
Name |
Type |
Description |
options |
Object
|
A literal object with options to pass to the
view
Properties
Name |
Type |
Attributes |
Default |
Description |
showFeedback |
boolean
|
<optional>
|
true
|
Set to false to hide the
feedback section |
showNavHelp |
boolean
|
<optional>
|
true
|
Set to false to hide the
navigation instructions section |
feedbackText |
string
|
<optional>
|
|
Text to show in the feedback
section |
|
- Source:
Renders the MapHelpPanel
- Source:
Returns:
Returns the view
-
Type
-
MapHelpPanel
renderFeedback(containerEl) → {HTMLElement}
Renders the feedback section
Parameters:
Name |
Type |
Description |
containerEl |
HTMLElement
|
The element to render the feedback
section within |
- Source:
Returns:
Returns the container element with the feedback
section added
-
Type
-
HTMLElement
renderNavHelp(containerEl) → {HTMLElement}
Renders the navigation instructions
Parameters:
Name |
Type |
Description |
containerEl |
HTMLElement
|
The element to render the navigation
instructions within |
- Source:
Returns:
Returns the container element with the
navigation instructions added
-
Type
-
HTMLElement
renderSection(section)
Renders a section of the help panel
Parameters:
- Source:
showSection(sectionEl, buttonElopt)
Shows a section by removing the hidden class, and adds the active class
to the button if one is provided
Parameters:
Name |
Type |
Attributes |
Description |
sectionEl |
HTMLElement
|
|
The section element to show |
buttonEl |
HTMLElement
|
<optional>
|
The button element to add the active
class to |
- Source: