본문으로 건너뛰기

UI API

UI API

getMenuButtonBoundingClientRect()

우측 상단 메뉴 버튼의 위치 정보를 조회합니다. UI 레이아웃 배치에 활용합니다.

반환값:

필드타입설명
topnumber상단 좌표 (px)
rightnumber우측 좌표 (px)
bottomnumber하단 좌표 (px)
leftnumber좌측 좌표 (px)
widthnumber버튼 너비 (px)
heightnumber버튼 높이 (px)
const rect = TudadaSDK.getMenuButtonBoundingClientRect();
console.log('위치:', rect.top, rect.right, rect.bottom, rect.left);
console.log('크기:', rect.width, 'x', rect.height);