getMenuButtonBoundingClientRect(params: Object)
Requires:
MiniKit≥2.3.0@ray-js/ray≥0.3.23
Platforms:
iOSAndroid
Description
Get the layout and position of the menu button (the capsule button in the top-right corner). Coordinates use the top-left of the screen as the origin.
Parameters
| Property | Type | Required | Description |
|---|---|---|---|
complete | () => void | No | Completion callback (executed on both success and failure) |
success | (params: Object) => void | No | Callback on successful API call |
fail | (params: Object) => void | No | Failure callback |
success callback parameters
| Property | Type | Description | MiniKit Since |
|---|---|---|---|
width | number | Width, unit: px | v3.2.0 |
height | number | Height, unit: px | v3.2.0 |
top | number | Top boundary coordinate, unit: px | v3.2.0 |
right | number | Right boundary coordinate, unit: px | v3.2.0 |
bottom | number | Bottom boundary coordinate, unit: px | v3.2.0 |
left | number | Left boundary coordinate, unit: px | v3.2.0 |
fail callback parameters
| Property | Type | Description |
|---|---|---|
errorMsg | string | Error message |
errorCode | string | number | Error code |
| Error extension |
Return Value
None