Options
All
  • Public
  • Public/Protected
  • All
Menu

A singleton modal region adapter that pops up when a view belonging to it is activated. An overlay element is used to fade the elements underneath the popup and to prevent user interaction with the app until the modal popup is dismissed.

Hierarchy

Index

Constructors

constructor

Properties

activeView

activeView: ViewBase

The active view currently being displayed.

activeViews

activeViews: ViewBase[]

The stack of active views.

app

The {@link geocortex.framework.application.Application} that this region adapter belongs to.

contentContainer

contentContainer: HTMLElement

Content container outer element.

contentElement

contentElement: HTMLElement

Content container inner DOM element.

contentHeader

contentHeader: HTMLElement

Window header DOM element.

contentTitle

contentTitle: HTMLElement

Window title DOM element.

defaultTransitionDelay

defaultTransitionDelay: number

Default time that views should take in transitioning from different states (active~inactive).

domElement

domElement: HTMLElement

The DOM element that this adapter works against.

isActive

isActive: boolean

Whether or not this region has one or more active views.

name

name: string

The name of this region adapter. Must be globally unique.

options

options: any

A key value-pair collection of configured options, specific to the particular region adapter.

overlayElement

overlayElement: HTMLElement

Modal overlay element.

ownerView

ownerView: ViewBase

The view that owns this region, if it's associated with one.

titleBindingToken

titleBindingToken: string

Token used to unsubscribe binding to the active view title.

views

views: ViewBase[]

Any views hosted in this region.

Methods

activate

  • activate(): void
  • Activates the region, displaying the modal overlay and any modal content.

    Returns void

activateView

  • Activates a view and pushes it to the top of the active views, activating the region if required.

    Parameters

    Returns void

cancelActivate

  • Because the adding of the "active" class is asynchronous (through setTimeout(0)), there can be a potential race condition whereby if a view is immediately deactivated after getting activated, it may actually get the "activated" class added to it after it has been deactivated. To prevent this from happening, this method should be called when deactivating or simply hiding a view.

    Parameters

    Returns void

cancelDeactivate

  • cancelDeactivate(view: ViewBase): void

deactivate

  • deactivate(): void
  • Deactivates the region, hiding the modal overlay and any modal content.

    Returns void

deactivateActiveView

  • deactivateActiveView(): void
  • Deactivates the active view.

    Returns void

deactivateView

  • Deactivates a view.

    Parameters

    • view: ViewBase

      The view to deactivate. The view should pre-exist in the region.

    Returns void

handleScrollEvent

  • handleScrollEvent(): void
  • Handles a scroll event on the window, which sets a timer to reposition the content.

    Returns void

hideAllViews

  • hideAllViews(): void
  • Hides all views hosted in the region.

    Returns void

host

  • host(element: HTMLElement): void
  • Attaches the region adapter to a DOM element.

    Parameters

    • element: HTMLElement

      The DOM element to adapt for.

    Returns void

hostView

  • Adds a view to this region. This region adapter actually hosts its content in one of the children of the actual region. This allows it to provide some container markup and an "X" button that will deactivate the current view.

    Parameters

    Returns boolean

positionContent

  • positionContent(): void
  • Centers the modal content.

    Returns void

showActiveView

  • Displays the active view, activating the modal popup and overlay if they are not already active.

    Parameters

    • view: ViewBase

      The active view to show.

    Returns void

unhost

  • unhost(): void
  • Called when the region adapter is to be removed from the user interface.

    Returns void

unhostView

Static getInstance