SubPanelSettings Class
A class holding properties of the SubPanel.
Item Index
Properties
content
String | jObject
The text inside the subpanel. Can be String or a jQuery object. All nodes sporting CSS class ".shorten-candidate" are treated to the shortening procedure - long strings are curtailed, and [more/less] links are placed at their ends.
Default: null
doAfterHide
Function
The callback function when the panel becomes hidden; also triggered by updating panel content; can be triggered many times.
Default: null
doAfterOpen
Function
The callback function when the panel finishes the opening animation; also triggered by updating panel content; can be triggered many times.
Default: null
doAfterUpdate
Function
The callback function executed after the SubPanel content is updated. Doesn't work correctly yet.
Default: null
doOnDestroy
Function
The callback function when the panel is completely closed, its nodes destroyed; can be triggered only once in a lifespan of the panel.
Default: null
doOnHide
Function
The callback function when the panel starts the closing animation; also triggered by updating panel content; can be triggered many times.
Default: null
doOnOpen
Function
The callback function when the panel starts the opening animation; also triggered by updating panel content; can be triggered many times.
Default: null
guid
String
A unique id of the SubPanel. If none provided, a random one is generated. It is used to determine the animation and update function to run on content update.
Default: ""
origin
String
The name of the module that requested to open the SubPanel (e.g. "filterManager"). Used for identification of the panel's loyalty.
Default: ""
panelName
String
A name used to identify the subpanel being opened (e.g. "Details", "Metadata")
Default: ""
showChars
Number
The target number of chars after which a content text node will be shortened.
Default: 170
target
JObject
The node after which the panel will be inserted (e.g. node.find(".layer-details")).
Default: null
title
String
Title of the content to be displayed on the SubPanel (e.g. "CESI Water Quality Indicators")
Default: ""
update
Boolean
Indicates that the open SubPanel request is a content update to the already opened SubPanel.
Does not trigger any of the doOn-
or doAfter-
functions.
Use case: the uses clicks on the metadata button.
- A request to open a SubPanel is sent with only the title since the metadata content is not yet available
- Metadata is fetched from the server
- A second request to open a SubPanel is sent having
update
set totrue
and featuring the sameguid
as the first request - Only the content of the SubPanel is updated; no extra animations are triggered
Default: false