getBoundingClientRect
Requires:
@ray-js/ray≥0.5.10
Method signature
getBoundingClientRect(ref: )Description
Get the node's coordinate information
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Yes | Node reference obtained via getElementById |
Return Value
Type: Promise<Rect>
Rect object containing the node's coordinates and size; returns null if the node does not exist
Referenced Types
interface
RectNode coordinate information| Property | Type | Description |
|---|---|---|
right | number | Coordinate of the node's right boundary |
left | number | Coordinate of the node's left boundary |
top | number | Coordinate of the node's top boundary |
bottom | number | Coordinate of the node's bottom boundary |
width | number | Node width |
height | number | Node height |