onFullImpression

fun Style.onFullImpression(visibleWidthRatio: Float = 0.0f, visibleHeightRatio: Float = 0.0f, callback: (FullImpressionVisibleEvent) -> Unit): Style

Registers a callback to be called when all parts of a Component have been made visible at some point, termed a "full impression". A full impression is defined as:

  • if the Component is smaller than the viewport, when the entire Component is visible

  • if the Component is bigger than the viewport, when all the edges have passed through the viewport once

Parameters

visibleWidthRatio

Ratio of the Component width for the full impression callback to be dispatched. Default is 0f.

visibleHeightRatio

Ratio of the Component height for the full impression callback to be dispatched. Default is 0f.

callback

Callback to be invoked when the full impression conditions are met.