當為 true 時,當鍵盤焦點位於其內容內時,按下 Escape 鍵後,Expand 小部件將關閉。此屬性也可以設置為返回布爾值的函數,允許更多自定義何時允許從
esc
鍵關閉 Expand 小部件。默認值:true
例子:
let expand = new Expand({ view: view, content: searchWidget, // widget will not be able to be closed from the ESC key closeOnEsc: false });
let expand = new Expand({ view: view, content: searchWidget, // widget will close on ESC when the search widget has no active menu closeOnEsc: function() { return searchWidget.activeMenu === "none" } });
基本信息
以下是所在類或對象的基本信息。
AMD:
require(["esri/widgets/Expand"], (Expand) => { /* code goes here */ });
ESM:
import Expand from "@arcgis/core/widgets/Expand";
類:
esri/widgets/Expand
繼承: Expand > Widget > Accessor
自從:用於 JavaScript 4.3 的 ArcGIS API
用法說明
Expand.closeOnEsc
函數(或屬性)的定義如下:
相關用法
- JavaScript ArcGIS Expand.classes用法及代碼示例
- JavaScript ArcGIS Expand.content用法及代碼示例
- JavaScript ArcGIS Expand.container用法及代碼示例
- JavaScript ArcGIS Expand.when用法及代碼示例
- JavaScript ArcGIS Expand.group用法及代碼示例
- JavaScript ArcGIS Expand.on用法及代碼示例
- JavaScript ArcGIS Expand.visible用法及代碼示例
- JavaScript ArcGIS Expand用法及代碼示例
- JavaScript ArcGIS ExpressionContent用法及代碼示例
- JavaScript ArcGIS ExpressionInfo.title用法及代碼示例
- JavaScript ArcGIS ExpressionInfo.expression用法及代碼示例
- JavaScript ArcGIS ExpressionInfo.name用法及代碼示例
- JavaScript ArcGIS ExpressionInfo用法及代碼示例
- JavaScript ArcGIS ExtrudeSymbol3DLayer.castShadows用法及代碼示例
- JavaScript ArcGIS ExtrudeSymbol3DLayer.clone用法及代碼示例
- JavaScript ArcGIS ExtrudeSymbol3DLayer.edges用法及代碼示例
- JavaScript ArcGIS ExtrudeSymbol3DLayer.size用法及代碼示例
- JavaScript ArcGIS ExtrudeSymbol3DLayer.material用法及代碼示例
- JavaScript ArcGIS ExtrudeSymbol3DLayer用法及代碼示例
- JavaScript ArcGIS ElementExpressionInfo.expression用法及代碼示例
- JavaScript ArcGIS ElevationProfile.profiles用法及代碼示例
- JavaScript ArcGIS ElevationLayer.fullExtent用法及代碼示例
- JavaScript ArcGIS ElevationLayer layerview-create-error事件用法及代碼示例
- JavaScript ArcGIS Editor.classes用法及代碼示例
- JavaScript ArcGIS ElevationLayer.on用法及代碼示例
注:本文由純淨天空篩選整理自arcgis.com大神的英文原創作品 Expand.closeOnEsc。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。