Reusable Accessible Mapping Platform

API Docs for: 5.3.2
Show:

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

Methods

autoHideDataTab

() private

A helper function that shows/hides Data tab if there some/none feature layers in the layer selector.

captureSubPanel

(
  • attr
)
private

Finds a SubPanel with origin equal to the supplied consumeOrigin and

  • changes its origin to the supplied origin
  • moves the SubPanel in the DOM hierarchy and attaches it to the specified target

Parameters:

  • attr SubPanelSettings

    Settings for the SubPanel; only origin, consumeOrigin and target are required here

dockSubPanel

(
  • attr
)
private

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:

  • attr SubPanelSettings

    Settings for the SubPanel; only target and origin are required here

hideSubPanel

(
  • attr
  • speed
  • d
)
private

Closes the SubPanel whose origin is specified in the attr parameter.

Parameters:

  • attr SubPanelSettings

    only origin attribute is required here

  • speed Number

    Duration of the closing animation

  • d Deferred

    The deferred object to be resolved upon successful closing of the panel

load

(
  • id
  • req
  • load
)

Call load to initialize the GUI module.

Parameters:

  • id Number

    ID of this module

  • req Object

    dojo required, can be used to require additional modules, etc.

  • load Function

    The callback function to be called as the very last thing in load

newSubPanel

(
  • attr
)
SubPanel private

Create a new SubPanel with the settings provided.

Parameters:

Returns:

SubPanel:

A newly created SubPanel

showSubPanel

(
  • attr
)
private

Creates and opens a new SubPanel with given settings. If the SubPanel with the requested origin is already present, updates its content.

Parameters:

stopEventPropagation

() private

Stops event propagation.

wmsQueryPopupHelper

(
  • d
)
private

A helper method that fires WMS_QUERY_CHANGE event.

Parameters:

  • d Object

    deferred to be resolved

Events

GUI.ADD_LAYER_PANEL_CHANGE

Published each time the Add Layer panel opens or closes.

Event Payload:

  • evt Object

    the event Object

    • visible Boolean

      true if the AddLayer panel is opened, false if the AddLayer panel is closed

GUI.DATAGRID_EXPAND

Fires whenever the extended grid button is clicked

GUI.FULLSCREEN_CHANGE

Published each time fullscreen is toggled

Event Payload:

  • evt Object

    the event Object

    • fullscreen Boolean

      true if fullscreen is on, false if fullscreen is off.

GUI.HELP_PANEL_CHANGE

Published each time the help panel opens or closes.

Event Payload:

  • evt Object

    the event Object

    • visible Boolean

      true if the help panel is opened, false if the help panel is closed

GUI.LAYOUT_CHANGE

Published each time the layout changes.

GUI.PANEL_CHANGE

Published each time the panel opens/closes

Event Payload:

  • evt Object

    the event Object

    • visible Boolean

      true if the panel is opened, false otherwise

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:

GUI.SUBPANEL_CHANGE

Published each time the subpanel opens/closes

Event Payload:

  • evt Object

    the event Object

    • visible Boolean

      true if the subpanel is opened, false otherwise

    • origin String
    • container JObject

      jQuery reference to the sub-panel container

GUI.SUBPANEL_CLOSE [subscribed]

Closes the sub panel

Event Payload:

  • origin String

    the 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:

  • origin String

    the name of the module that requested to dock the subPanel (e.g. "filterManager")

  • target JNode

    where to move the subPanel; if not supplied; sidePanel is used

GUI.SUBPANEL_OPEN [subscribed]

Opens the subpanel

Event Payload:

GUI.TAB_DESELECTED

Fires whenever a tab has been deselected in the main panel

Event Payload:

  • evt Object

    the event Object

    • id String

      the id of the deselected tab

    • tabName String

      the name of the deselected tab

GUI.TAB_SELECTED

Fires whenever a tab has been selected in the main panel

Event Payload:

  • evt Object

    the event Object

    • id String

      the id of the selected tab

    • tabName String

      the name of the selected tab

GUI.TOGGLE_FULLSCREEN [subscribed]

Toggles the fullscreen

Event Payload:

  • evt Object

    the event Object

    • expand Boolean

      true if we should go into fullscreen mode, false if we wish to collapse to normal mode. If undefined, it toggles the fullscreen (i.e. make it fullscreen if it was not, make it collapse to regard mode if it was fullscreen).

GUI.TOOLBAR_SECTION_CLOSE

Published each time a toolbar section / widget is closed.

Event Payload:

  • evt Object

    the event Object

    • id String

      id of the source section / widget

GUI.TOOLBAR_SECTION_OPEN

Published each time a toolbar section / widget is opened. Used to close other toolbar sections / widgets.

Event Payload:

  • evt Object

    the event Object

    • id String

      id of the source section / widget

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.