Class: UiViewUtils
A utility class for working with UI views.
Constructors
constructor
• new UiViewUtils(): UiViewUtils
Returns
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
Name | Type | Default value | Description |
---|---|---|---|
options | UiPositionedPopupOpenOptions | undefined | The popup opening options for which to set parameters. |
container | HTMLElement | undefined | The root element of the popup's view stack container. |
target | HTMLElement | undefined | The 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' . |
xOffset | number | 0 | The horizontal offset to apply to the popup's position after alignment, in pixels. |
yOffset | number | 0 | The vertical offset to apply to the popup's position after alignment, in pixels. |
Returns
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