Home Reference Source
import {Shield} from 'guide4you/src/html/Shield.js'
public class | source

Shield

Extends:

ol/Object~BaseObject → Shield

A shield that sets itself in front of all other elements in a context if activated, hides itself if deactivated. It can get another element in front of it (Attention: it gets removed from its context temporarly)

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public

active_: *

Private Members
private

$context_: jQuery

private

$element_: jQuery

private
private
private

Method Summary

Public Methods
public

add$OnTop($element: jQuery, options: OnTopOptions)

Gets the given element in front of the shield.

public

Returns all children in front of the shield

public
public

remove$OnTop($element: jQuery): Promise

Returns the given element in front of the shield to the previous context

public

setActive(active: boolean)

Public Constructors

public constructor(options: ShieldOptions) source

Params:

NameTypeAttributeDescription
options ShieldOptions

Public Members

public active_: * source

Private Members

private $context_: jQuery source

private $element_: jQuery source

private className_: string source

private elementsOnTop_: Map<jQuery, ElementPosition> source

private map_: G4UMap source

Public Methods

public add$OnTop($element: jQuery, options: OnTopOptions) source

Gets the given element in front of the shield. The element is removed from its context temporarily

Params:

NameTypeAttributeDescription
$element jQuery
options OnTopOptions
  • optional

public get$ElementsInFront(): jQuery source

Returns all children in front of the shield

Return:

jQuery

public getActive(): boolean source

Return:

boolean

public remove$OnTop($element: jQuery): Promise source

Returns the given element in front of the shield to the previous context

Params:

NameTypeAttributeDescription
$element jQuery

Return:

Promise

public setActive(active: boolean) source

Params:

NameTypeAttributeDescription
active boolean