Reusable Accessible Mapping Platform

API Docs for: 5.3.2
Show:

LayoutController Class

Module: UI
Parent Module: RAMP

Controls layout transition such as full-data and full-screen modes, opening and closing of the side panel, adjusts layout when resizing the browser window.

Methods

_toggleFullDataMode

(
  • [fullData]
)
private

Toggles the full-data mode on and off.

Parameters:

  • [fullData] Boolean optional

    if true, switches to full-data mode; if false, switches to summary mode; if undefined, toggle mode based on the current state

adjustHeight

() private

Adjusts the height of the help section based on the height of the window.

closePanel

(
  • d
)
private

Slide the SidePanel close

Parameters:

  • d Deferred

    A deferred to be resolved upon completion of the animation

getContainer

() JObject

Returns the outer most div of this SidePanel.

Returns:

JObject:

The outer most div of this SidePanel

init

()

Initializes layout controller.

isFullData

() Boolean

Returns the state of the full-data mode.

Returns:

Boolean:

True is full-data mode on; false otherwise

layoutChange

() private

Fires an event when the layout of the page changes.

onFullScreenComplete

() private

Executed after full-screen mode transition is complete.

openPanel

(
  • d
)
private

Slides the SidePanel open.

Parameters:

  • d Deferred

    A deferred to be resolved upon completion of the animation

optimizeLayout

() private

Optimizes layout based on the window width

panelChange

(
  • visible
)
private

Publishes PANEL_CHANGE event when the visibility of the SidePanel changes.

Parameters:

  • visible Boolean

    Indicates whether the SidePanel is visible or not

setupNoDataTimeLine

() private

Setup noDataTimeLine for data tab animation

subPanelChange

(
  • visible
  • origin
  • container
  • isComplete
)

Fires an event when the subpanel closes or opens.

Parameters:

  • visible Boolean

    indicates whether the subpanel is visible or not (the panel is considered invisible when it's being destroyed, starts closing)

  • origin String

    origin of the subpanel

  • container JObject

    subpanel container

  • isComplete Boolean

    indicates if subPanel transition has completed or just started

toggleDataTab

(
  • open
)

Toggles the visibility of Data tab in the side panel

Parameters:

  • open Boolean

    true - show; false - hide;

toggleFullDataMode

(
  • [fullData]
)

Toggles the full-data mode on and off.

Parameters:

  • [fullData] Boolean optional

    if true, switches to full-data mode; if false, switches to summary mode; if undefined, toggle mode based on the current state

toggleFullScreenMode

(
  • fullscreen
)

Toggles the FullScreen mode of the application

Parameters:

  • fullscreen Boolean

    true - expand; false - collapse; undefined - toggle;

updatePanelWidth

() private

Changes internal panel width reference based on the window width.

width

() Number

Gets the width of this SidePanel.

Returns:

Number:

The width of this SidePanel