onVisibilityChanged

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

Registers a callback to be called when the visible rect of a Component changes.

Parameters

visibleWidthRatio

Ratio of the Component width for the visibility changed callback to be dispatched. Default is 0f.

visibleHeightRatio

Ratio of the Component height for the visibility changed callback to be dispatched. Default is 0f.

callback

Callback to be invoked when the visible rect changes.