# Panel
Creates a panel component.
Extends Object (opens new window).
new Panel(options: Object)
# Parameters
# options (Object (opens new window))
| Name | Description |
|---|---|
options.modalboolean (opens new window) | If true, the panel will be modal and will close if the user clicks outside. |
# Instance Members
# addTo(map)
Adds the panel to a map.
# Parameters
map (Map) The Mini Tokyo 3D map to add the panel to.
# Returns
Panel: Returns itself to allow for method chaining.
# isOpen()
Checks if a panel is open.
# Returns
boolean (opens new window): true if the panel is open, false if it is closed.
# remove()
Removes the panel from a map.
# Returns
Panel: Returns itself to allow for method chaining.
# setButtons(buttons)
Sets buttons on the panel's title.
# Parameters
buttons (Array (opens new window)<HTMLElement (opens new window)>) An array of DOM elements to use as buttons on the title of the panel.
# Returns
Panel: Returns itself to allow for method chaining.
# setHTML(html)
Sets the panel's content to the HTML provided as a string.
This method does not perform HTML filtering or sanitization, and must be used only with trusted content.
# Parameters
html (string (opens new window)) A string representing HTML content for the panel.
# Returns
Panel: Returns itself to allow for method chaining.
# setTitle(title)
Sets the panel's title to a string of text.
# Parameters
title (string (opens new window)) The title of the panel.
# Returns
Panel: Returns itself to allow for method chaining.