إشعار: يجب
إثبات أهلية جميع المشاريع غير التجارية المسجّلة لاستخدام Earth Engine قبل
15 أبريل 2025 من أجل الحفاظ على إمكانية الوصول إلى Earth Engine.
ui.root.onResize
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
تسجّل هذه السمة دالة ردّ يتم تشغيلها عند بدء النص البرمجي وكلما تغيّر حجم نافذة المتصفّح. سيتم تمرير عنصر يحتوي على الحقول المنطقية "is_mobile" و"is_tablet" و"is_desktop" و"is_portrait" و "is_landscape"، والحقلين الرقميين "width" و "height".
تشير هذه الحقول إلى ما إذا كان جهاز المستخدِم جوّالاً أو لوحيًا أو كمبيوتر مكتبيًا، وإلى اتجاه الجهاز (عمودي أو أفقي)، وإلى عرض النافذة وارتفاعها بالبكسل. اطّلِع على قسم "العرض والارتفاع (وحدات بكسل مستقلة عن الكثافة)" في مقاييس الأجهزة على الرابط https://material.io/resources/devices/.
الاستخدام | المرتجعات |
---|
ui.root.onResize(callback) | |
الوسيطة | النوع | التفاصيل |
---|
callback | الوظيفة | الدالة التي سيتم تنفيذها بعد تغيير حجم النافذة. يتم تمرير عنصر يحتوي على معلومات الجهاز إلى دالة رد الاتصال. |
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-07-26 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-07-26 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\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. |"]]