公告:凡是在
2025 年 4 月 15 日前註冊使用 Earth Engine 的非商業專案,都必須
驗證非商業用途資格,才能繼續存取 Earth Engine。
ui.Panel.Layout.flow
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
傳回將小工具放在流程中的版面配置,可以是水平或垂直。
根據預設,小工具會在流程版面配置面板中佔用自然空間。在新增的小工具上設定「stretch」樣式屬性,即可將小工具延展開來,填滿相關方向的可用空間:
- 橫向、直向、兩者皆是
如果有多個小工具延展,可用空間會平均分配給這些小工具。面板本身就是小工具,您可以指定「stretch」樣式屬性來延展面板。
用量 | 傳回 |
---|
ui.Panel.Layout.flow(direction, wrap) | ui.Panel.Layout |
引數 | 類型 | 詳細資料 |
---|
direction | 字串 (選用) | 流程方向。可以是「horizontal」或「vertical」。預設值為「vertical」。 |
wrap | 布林值 (選填) | 是否要在版面配置中包裝子項,以免一行顯示太多子項。預設值為 false。 |
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-26 (世界標準時間)。
[null,null,["上次更新時間:2025-07-26 (世界標準時間)。"],[[["\u003cp\u003eThe \u003ccode\u003eui.Panel.Layout.flow()\u003c/code\u003e function arranges widgets within a panel in either a horizontal or vertical flow.\u003c/p\u003e\n"],["\u003cp\u003eWidgets naturally occupy their required space but can be stretched to fill available space using the "stretch" style property.\u003c/p\u003e\n"],["\u003cp\u003eWhen multiple widgets have the "stretch" property, the available space is divided equally among them, including panels which are also widgets.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eflow\u003c/code\u003e layout can be customized using the \u003ccode\u003edirection\u003c/code\u003e argument for flow orientation (horizontal or vertical) and the \u003ccode\u003ewrap\u003c/code\u003e argument to control wrapping of overflowing widgets.\u003c/p\u003e\n"]]],[],null,["# ui.Panel.Layout.flow\n\n\u003cbr /\u003e\n\nReturns a layout that places its widgets in a flow, either horizontal or vertical.\n\n\u003cbr /\u003e\n\nBy default, widgets take up their natural space within a flow layout panel. Set the \"stretch\" style property on an added widget to stretch it to fill available space in the relevant direction:\n\n- horizontal, vertical, both\n\nWhen multiple widgets are stretched, the available space is split equally among them. Panels are widgets themselves and can be stretched by specifying a \"stretch\" style property.\n\n| Usage | Returns |\n|--------------------------------------------------|-----------------|\n| `ui.Panel.Layout.flow(`*direction* `, `*wrap*`)` | ui.Panel.Layout |\n\n| Argument | Type | Details |\n|-------------|-------------------|------------------------------------------------------------------------------------------------------|\n| `direction` | String, optional | The direction of the flow. One of 'horizontal' or 'vertical'. Defaults to 'vertical'. |\n| `wrap` | Boolean, optional | Whether to wrap children in the layout if there are too many to show in one line. Defaults to false. |"]]