-
Notifications
You must be signed in to change notification settings - Fork 110
ClosePanel
Rodrigo E. Principe edited this page Jun 7, 2019
·
5 revisions
A Panel with an X
button for "closing" it. To make it work you must add it to another Panel
or Map
with its method addTo
or insertTo
, otherwise it will not be able to close it. Parameters are similar to ui.Panel
. The difference is that it has a parameter inner_style
to set the style for the inner Panel, like backgroundColor
or border
. To close the panel using another widget it has a close
method.
Options:
- widgets: a list of widgets to add to the panel
-
style:
- position: position of the panel
- backgroundColor: background color of the panel
- margin: margin of the panel
- shown: shown option of the panel
- border: border of the panel
-
inner_style:
- position: position of the inner panel
- backgroundColor: background color of the inner panel
- margin: margin of the inner panel
- shown: shown option of the inner panel
- layout: layout of the panel
Methods:
- addTo(widget): adds the panel to the parsed widget
- insertTo(widget, position): inserts the panel to the parsed widget in the parsed position
- close(): closes the panel
- onClose(callback): registers a callback that's fired when the panel is closed. The argument for the callback is the ClosePanel widget
- all ui.Panel methods (apply to the inner panel)
example: https://code.earthengine.google.com/065529a65dd0699611e8491515e67f5b
- @author: Rodrigo E. Principe
- email: fitoprincipe82 at gmail
- Licence: MIT