Try Install Learn Blog API Packages GitHub
Pages

Ui.StickyPanel

A panel that sticks to the given element.

States

left
:
Number
=
0

Variable for the left position.

top
:
Number
=
0

Variable for the right position.

Properties

content
:
Html
=
Html.empty()

The content to position.

element
:
Html
=
Html.empty()

The element to position against.

offset
:
Number
=
0

The offset of the panel.

passThrough
:
Bool
=
false

If true, pointer events will pass through the panel.

position
:
String
=
"bottom-left"

The position of the panel.

shouldCalculate
:
Bool
=
true

A flag that decides if the position should be calculated on animation frames.

zIndex
:
Number
=
0

The z-index of the panel.

Functions

calculatePosition
(
position
:
String
dimensions
:
Dom.Dimensions
panel
:
Dom.Dimensions
)
:
Dom.Dimensions

Calculates the position from the dimensions of the panel and element.

isFullyVisible
(
dimensions
:
Dom.Dimensions
)
:
Bool

Returns true if the dimensions are fully visible in the window.

TODO: Move to core.

render
:
Array(Html)

Renders the element and the panel.

updateDimensions
:
Promise(Never, Void)

Calculates the position of the panel.