Options
All
  • Public
  • Public/Protected
  • All
Menu

Displays a single div in a named region. If another div is added to the region, the previous one is removed.

Hierarchy

Index

Constructors

constructor

  • Initializes a new instance of the {@link geocortex.framework.ui.DivRegionAdapter} class.

    Parameters

    • name: string

      Region name to use for this adapter.

    • app: Application

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

    Returns DivRegionAdapter

Properties

activeViews

activeViews: ViewBase[]

Active views in this region.

app

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

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.

ownerView

ownerView: ViewBase

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

views

views: ViewBase[]

Any views hosted in this region.

Methods

activateView

  • Activates a view in the context of the adapter, generally making it visible and interactive.

    Parameters

    • view: ViewBase

      The view to activate. This view should already be hosted in the region.

    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

deactivateView

  • Deactivates a view in the context of the adapter, generally making it non-visible and non-interactive.

    Parameters

    • view: ViewBase

      The view to deactivate. This view should already be hosted in the region.

    Returns void

host

  • host(element: HTMLElement, options?: any): void
  • Hosts the region in the given DOM element. Views will be adapted for this element.

    Parameters

    • element: HTMLElement

      The DOM element to adapt views for.

    • Optional options: any

      The data region options as a key-value pair collection (i.e. an object).

    Returns void

hostView

  • Hosts a single view in the region, removing any pre-existing ones.

    Parameters

    Returns boolean

unhost

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

    Returns void

unhostAllViews

  • unhostAllViews(): void
  • Removes all views from the region.

    Returns void

unhostView

  • Removes a view from the region. The view should pre-exist in the region.

    Parameters

    Returns void