diff --git a/api/@internal/component/ets/common.d.ts b/api/@internal/component/ets/common.d.ts index ebfd56c0c4ee1705ba31272149094e8bdbd40fcc..0dba2ea2f445ae31c44a55165d81e71b73d424a0 100644 --- a/api/@internal/component/ets/common.d.ts +++ b/api/@internal/component/ets/common.d.ts @@ -29516,6 +29516,24 @@ declare class CommonMethod { */ onVisibleAreaChange(ratios: Array, event: VisibleAreaChangeCallback): T; + /** + * Trigger a visible area change event. + * + * @param { Array } ratios - Threshold array. Each threshold represents a ratio of the component's visible area to the component's total area. + * The value range of the threshold is [0.0, 1.0]. + * @param { VisibleAreaChangeCallback } event - Callback for visible area changes of the component. + * @param { boolean } measureFromViewport - When this parameter is set to true, the parts of the component + * that exceed the parent component's area wil also be included in the visible area calculation. However, this + * only applies if the parent component does not explicitly set the clip property to true. If the parent + * component sets clip to ture, regardless of the value of this parameter, the parts that exceed the parent + * component's area will still be treated as invisible in the visible area calculation. + * @returns { T } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 21 + */ + onVisibleAreaChange(ratios: Array, event: VisibleAreaChangeCallback, measureFromViewport: boolean): T; /** * Set or reset the callback which is triggered when the visibleArea of component changed. @@ -35183,6 +35201,22 @@ declare interface VisibleAreaEventOptions { * @arkts 1.1&1.2 */ expectedUpdateInterval?: number; + + /** + * When this parameter is set to true, the parts of the component that exceed the parent component's area will also + * be included in the visible area calculation. However, this only applies if the parent component does not + * explicitly set the clip property to true. If the parent component sets clip to true, regardless of the value + * of this parameter, the parts that exceed the parent component's area will still be treated as invisible in the + * visible area calculation. + * + * @type { ?boolean } + * @default false + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 21 + */ + measureFromViewport?: boolean; } /**