Class: MapHelpPanel

MapHelpPanel()

The MapHelpPanel view displays navigation instructions and other help information for the map.

Screenshot

Constructor

new MapHelpPanel()

Since:
  • 2.27.0
Source:

Extends

  • Backbone.View

Members

className :string

The HTML classes to use for this view's element
Type:
  • string
Source:

feedbackText :string

Text to show in the feedback section
Type:
  • string
Source:
The template to use to show the navigation instructions
Type:
  • function
Source:

sections :Array.<Object>

The sections to show in the help panel
Type:
  • Array.<Object>
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:
  • boolean
Default Value:
  • true
Source:

showNavHelp :boolean

Set to false to hide the navigation instructions section
Type:
  • boolean
Default Value:
  • true
Source:

type :string

The type of View this is
Type:
  • string
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:

render() → {MapHelpPanel}

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:
Name Type Description
section Object The options for the section, see MapHelpPanel#sections
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: