Skip to main content

Class: UiViewUtils

A utility class for working with UI views.

Constructors

constructor

new UiViewUtils(): UiViewUtils

Returns

UiViewUtils

Methods

alignPositionedPopupToElement

alignPositionedPopupToElement(options, container, target, popupReference?, alignTo?, xOffset?, yOffset?): UiPositionedPopupOpenOptions

Sets the parameters of a positioned popup's opening options to align the popup with an element rendered in the same view stack container.

Parameters

NameTypeDefault valueDescription
optionsUiPositionedPopupOpenOptionsundefinedThe popup opening options for which to set parameters.
containerHTMLElementundefinedThe root element of the popup's view stack container.
targetHTMLElementundefinedThe target element to which to align the popup.
popupReference"top-right" | "bottom-left" | "bottom-right" | "top-left"'top-left'The reference corner of the popup which will be aligned to the target element. Defaults to 'top-left'.
alignTo"top-right" | "bottom-left" | "bottom-right" | "top-left"'top-left'The edges of the target element to which to align the popup. Defaults to 'top-left'.
xOffsetnumber0The horizontal offset to apply to the popup's position after alignment, in pixels.
yOffsetnumber0The vertical offset to apply to the popup's position after alignment, in pixels.

Returns

UiPositionedPopupOpenOptions

The provided popup opening options, after its parameters have been set to align the popup in the specified manner.

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/UiSystem/UiViewUtils.ts:21