GUI Class
A class for handling most of the GUI on the page.
Imports RAMP Modules:
GlobalStorage
EventManager
Theme
Util
Dictionary
PopupManager
TmplHelper
Uses RAMP Templates:
templates/sub_panel_template.json
Item Index
Methods
Events
- GUI.ADD_LAYER_PANEL_CHANGE
- GUI.DATAGRID_EXPAND
- GUI.FULLSCREEN_CHANGE
- GUI.HELP_PANEL_CHANGE
- GUI.LAYOUT_CHANGE
- GUI.PANEL_CHANGE
- GUI.PANEL_TOGGLE [subscribed]
- GUI.SUBPANEL_CAPTURE [subscribed]
- GUI.SUBPANEL_CHANGE
- GUI.SUBPANEL_CLOSE [subscribed]
- GUI.SUBPANEL_DOCK [subscribed]
- GUI.SUBPANEL_OPEN [subscribed]
- GUI.TAB_DESELECTED
- GUI.TAB_SELECTED
- GUI.TOGGLE_FULLSCREEN [subscribed]
- GUI.TOOLBAR_SECTION_CLOSE
- GUI.TOOLBAR_SECTION_OPEN
- GUI.UPDATE_COMPLETE
Methods
autoHideDataTab
()
private
A helper function that shows/hides Data tab if there some/none feature layers in the layer selector.
captureSubPanel
-
attr
Finds a SubPanel with origin equal to the supplied consumeOrigin and
- changes its
originto the suppliedorigin - moves the SubPanel in the DOM hierarchy and attaches it to the specified target
Parameters:
-
attrSubPanelSettingsSettings for the SubPanel; only
origin,consumeOriginandtargetare required here
dockSubPanel
-
attr
Moves the SubPanel with the specified origin in the DOM hierarchy to the new specified target; if target is not specified, the SubPanel is attached to the SidePanel.
Parameters:
-
attrSubPanelSettingsSettings for the SubPanel; only
targetandoriginare required here
hideSubPanel
-
attr -
speed -
d
Closes the SubPanel whose origin is specified in the attr parameter.
Parameters:
-
attrSubPanelSettingsonly
originattribute is required here -
speedNumberDuration of the closing animation
-
dDeferredThe deferred object to be resolved upon successful closing of the panel
load
-
id -
req -
load
Call load to initialize the GUI module.
newSubPanel
-
attr
Create a new SubPanel with the settings provided.
Parameters:
-
attrSubPanelSettingsSubPanel settings
Returns:
A newly created SubPanel
showSubPanel
-
attr
Creates and opens a new SubPanel with given settings.
If the SubPanel with the requested origin is already present, updates its content.
Parameters:
-
attrSubPanelSettingsSettings for the SubPanel instance
stopEventPropagation
()
private
Stops event propagation.
Events
GUI.ADD_LAYER_PANEL_CHANGE
Published each time the Add Layer panel opens or closes.
GUI.DATAGRID_EXPAND
Fires whenever the extended grid button is clicked
GUI.FULLSCREEN_CHANGE
Published each time fullscreen is toggled
GUI.HELP_PANEL_CHANGE
Published each time the help panel opens or closes.
GUI.LAYOUT_CHANGE
Published each time the layout changes.
GUI.PANEL_CHANGE
Published each time the panel opens/closes
GUI.PANEL_TOGGLE [subscribed]
Toggles the main panel (i.e. collapses it if was expanded, and expands it if it was collapsed)
GUI.SUBPANEL_CAPTURE [subscribed]
Attaches subPanel node to the module that calls it in the DOM hierarchy
Event Payload:
-
consumeOriginObject
GUI.SUBPANEL_CHANGE
Published each time the subpanel opens/closes
GUI.SUBPANEL_CLOSE [subscribed]
Closes the sub panel
Event Payload:
-
originStringthe name of the module that requested to close the subPanel (e.g. 'filterManager')
GUI.SUBPANEL_DOCK [subscribed]
Moves the panel up DOM hierarchy next to the sidePanel, or to other target
Event Payload:
-
originStringthe name of the module that requested to dock the subPanel (e.g. 'filterManager')
-
targetJNodewhere to move the subPanel; if not supplied; sidePanel is used
GUI.SUBPANEL_OPEN [subscribed]
Opens the subpanel
Event Payload:
-
attrSubPanelSettingsSettings for the SubPanel
GUI.TAB_DESELECTED
Fires whenever a tab has been deselected in the main panel
GUI.TAB_SELECTED
Fires whenever a tab has been selected in the main panel
GUI.TOGGLE_FULLSCREEN [subscribed]
Toggles the fullscreen
GUI.TOOLBAR_SECTION_CLOSE
Published each time a toolbar section / widget is closed.
GUI.TOOLBAR_SECTION_OPEN
Published each time a toolbar section / widget is opened. Used to close other toolbar sections / widgets.
GUI.UPDATE_COMPLETE
Published when the gui module has completely finished rendering the UI. The bootstrapper should wait for this event to fire before initializing map.
undefined