ViewportIntersection
Namespace: E2E.Engine
public sealed record ViewportIntersection : IEquatable<ViewportIntersection>How much of a node’s box is inside the viewport, after clipping by the viewport and by every ancestor that clips its content (a scroll
container, overflow: hidden, a frame), as ViewportIntersection measures it. It says nothing about another
node covering the box. Upstream’s ViewportIntersection (engine/contract.ts).
Inheritance: object
Implements: IEquatable<ViewportIntersection>
Constructors
Section titled “Constructors”ViewportIntersection(bool, double?)
Section titled “ViewportIntersection(bool, double?)”public ViewportIntersection(bool Intersects, double? Ratio = null)How much of a node’s box is inside the viewport, after clipping by the viewport and by every ancestor that clips its content (a scroll
container, overflow: hidden, a frame), as ViewportIntersection measures it. It says nothing about another
node covering the box. Upstream’s ViewportIntersection (engine/contract.ts).
Parameters
| Name | Type | Description |
|---|---|---|
Intersects |
bool | Whether a positive area of the box is inside; false for a node with no box or an empty one. |
Ratio |
double? | The inside area over the whole box’s area, from 0 to 1. Null where the platform reports only the visible part of a box, so the whole is unknown. |
Properties
Section titled “Properties”Intersects
Section titled “Intersects”public bool Intersects { get; init; }Whether a positive area of the box is inside; false for a node with no box or an empty one.
Value: bool
public double? Ratio { get; init; }The inside area over the whole box’s area, from 0 to 1. Null where the platform reports only the visible part of a box, so the whole is unknown.
Value: double?