공지사항:
2025년 4월 15일 전에 Earth Engine 사용을 위해 등록된 모든 비상업용 프로젝트는 Earth Engine 액세스를 유지하기 위해
비상업용 자격 요건을 인증해야 합니다.
ui.root.onResize
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
스크립트가 시작될 때와 브라우저 창 크기가 변경될 때마다 실행되는 콜백을 등록합니다. 불리언 필드 'is_mobile', 'is_tablet', 'is_desktop', 'is_portrait', 'is_landscape'와 숫자 필드 'width', 'height'가 있는 객체가 전달됩니다.
이 필드는 사용자의 기기가 모바일인지, 태블릿인지, 데스크톱인지, 기기 방향(세로 또는 가로) 및 윈도우의 너비와 높이(픽셀)를 나타냅니다. https://material.io/resources/devices/의 기기 측정항목에서 너비 및 높이 (dp) 섹션을 참고하세요.
사용 | 반환 값 |
---|
ui.root.onResize(callback) | |
인수 | 유형 | 세부정보 |
---|
callback | 함수 | 창의 크기가 조절된 후 실행할 콜백입니다. 콜백에는 기기 정보가 포함된 객체가 전달됩니다. |
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-07-26(UTC)
[null,null,["최종 업데이트: 2025-07-26(UTC)"],[[["\u003cp\u003eTriggers a provided function when the webpage loads or the browser window is resized.\u003c/p\u003e\n"],["\u003cp\u003eProvides details about the device used, such as whether it is a mobile, tablet, or desktop, its orientation (portrait or landscape), and the window's dimensions in pixels.\u003c/p\u003e\n"],["\u003cp\u003eUtilizes boolean fields ("is_mobile", "is_tablet", "is_desktop", "is_portrait", "is_landscape") and numeric fields ("width", "height") within a passed object to convey device information.\u003c/p\u003e\n"],["\u003cp\u003eCan be implemented using \u003ccode\u003eui.root.onResize(callback)\u003c/code\u003e, where \u003ccode\u003ecallback\u003c/code\u003e represents the function to be executed.\u003c/p\u003e\n"]]],[],null,["# ui.root.onResize\n\n\u003cbr /\u003e\n\nRegisters a callback that's fired when the script starts and whenever the browser window size changes. It will be passed an object with boolean fields \"is_mobile\", \"is_tablet\", \"is_desktop\", \"is_portrait\" and \"is_landscape\", and numeric fields \"width\" and \"height\".\n\n\u003cbr /\u003e\n\nThese fields indicate whether a user's device is mobile, tablet or desktop, the device orientation (portrait or landscape), and the width and height of the window in pixels. See the Width and Height (dp) section of device metrics at https://material.io/resources/devices/.\n\n| Usage | Returns |\n|------------------------------|---------|\n| `ui.root.onResize(callback)` | |\n\n| Argument | Type | Details |\n|------------|----------|------------------------------------------------------------------------------------------------------------------------------|\n| `callback` | Function | The callback to fire after the window has been resized. The callback is passed an object with the information of the device. |"]]