You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

2.2 KiB

Panel

Creates a panel component.

Extends Object.

new Panel(options: Object)

Parameters

options (Object)

Name Description
options.modal
boolean
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: 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<HTMLElement>) 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) 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) The title of the panel.

Returns

Panel: Returns itself to allow for method chaining.