当前位置: 首页>>代码示例 >>用法及示例精选 >>正文


JavaScript ArcGIS UI.padding用法及代码示例


基本信息

以下是所在类或对象的基本信息。

AMD: require(["esri/views/ui/UI"], (UI) => { /* code goes here */ });

ESM: import UI from "@arcgis/core/views/ui/UI";

类: esri/views/ui/UI

继承: UI > Accessor

子类: DefaultUI

自从:用于 JavaScript 4.0 的 ArcGIS API

用法说明

UI.padding函数(或属性)的定义如下:

padding Object | Number


从容器或 View 的顶部、左侧、右侧和底部定义 UI 的填充。如果该值是一个数字,它将用于填充容器的所有侧面。

默认值:{ left: 15, top: 15, right: 15, bottom: 15 }

例子:

// Setting a single number to this property
ui.padding = 0;
// is the same as setting it on all properties of the object
ui.padding = { top: 0, left: 0, right: 0, bottom: 0 };

相关用法


注:本文由纯净天空筛选整理自arcgis.com大神的英文原创作品 UI.padding。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。