UI API
UI API
getMenuButtonBoundingClientRect()
Retrieves the position information of the top-right menu button. Used for UI layout positioning.
Return Value:
| Field | Type | Description |
|---|---|---|
top | number | Top coordinate (px) |
right | number | Right coordinate (px) |
bottom | number | Bottom coordinate (px) |
left | number | Left coordinate (px) |
width | number | Button width (px) |
height | number | Button height (px) |
const rect = TudadaSDK.getMenuButtonBoundingClientRect();
console.log('Position:', rect.top, rect.right, rect.bottom, rect.left);
console.log('Size:', rect.width, 'x', rect.height);