getMenuButtonBoundingClientRectSync()

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

None

Return Value

Type: Object↓
PropertyTypeDescription
widthnumberWidth, unit: px
heightnumberHeight, unit: px
topnumberTop boundary coordinate, unit: px
rightnumberRight boundary coordinate, unit: px
bottomnumberBottom boundary coordinate, unit: px
leftnumberLeft boundary coordinate, unit: px

Examples

import { getMenuButtonBoundingClientRect } from '@ray-js/ray'

getMenuButtonBoundingClientRect({
  success: data => {
    console.log(data);
  },
  fail: error => {
    console.error(error);
  },
});