DOMContainer.jsdoc
5.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
/**
* @module esri/views/DOMContainer
* @mixin
*/
////////////////////////////////////////////////////////////
//
// Properties
//
////////////////////////////////////////////////////////////
//----------------------------------
// container
//----------------------------------
/**
* The `id` or node representing the DOM element containing the view. This is typically set in the view's constructor.
*
* @type {HTMLDivElement | string}
* @name container
* @memberof module:esri/views/DOMContainer
*
* @example
* // Sets container to the DOM id
* var view = new MapView({
* container: "viewDiv" // ID of the HTML element that holds the view
* });
* @example
* // Sets container to the node
* var viewNode = document.getElementById("viewDiv");
* var view = new SceneView({
* container: viewNode
* });
*/
//----------------------------------
// height
//----------------------------------
/**
* The height of the view in pixels read from the view container element.
*
* The view container needs to have a height greater than 0 to be displayed.
*
* @name height
* @type {number}
* @memberof module:esri/views/DOMContainer
* @readonly
* @default 0
*/
//----------------------------------
// popup
//----------------------------------
/**
* A Popup object that displays general content or attributes from
* {@link module:esri/Map#layers layers} in the [map](#map).
*
* The view has a default instance of {@link module:esri/widgets/Popup} with
* predefined styles and a template for defining content. The content in this
* default instance may be modified directly in the
* {@link module:esri/widgets/Popup#content popup's content} or in a layer's
* {@link module:esri/PopupTemplate}.
*
* You may create a new {@link module:esri/widgets/Popup} instance and set it to
* this property to customize the style, positioning, and content of the popup
* in favor of using the default popup instance on the view.
*
* @name popup
* @type {module:esri/widgets/Popup}
*
* @memberof module:esri/views/DOMContainer
* @autocast
*/
//----------------------------------
// resizing
//----------------------------------
/**
* Indicates if the view is being resized.
*
* @name resizing
* @type {boolean}
*
* @memberof module:esri/views/DOMContainer
* @readonly
* @default false
*/
//----------------------------------
// size
//----------------------------------
/**
* An array containing the width and height of the view in pixels, e.g. `[width, height]`.
*
* @name size
* @type {number[]}
*
* @memberof module:esri/views/DOMContainer
* @readonly
*/
//----------------------------------
// suspended
//----------------------------------
/**
* Indicates if the view is visible on the page.
* Is `true` if the view has no [container](#container),
* a [height](#height) or [width](#width) equal to 0,
* or the CSS `visibility` is `hidden`.
*
* @name suspended
* @type {boolean}
*
* @memberof module:esri/views/DOMContainer
* @readonly
* @default true
*/
//----------------------------------
// ui
//----------------------------------
/**
* Exposes the default widgets available in the view and allows you to toggle them on
* and off. See {@link module:esri/views/ui/DefaultUI} for more details.
*
* @name ui
* @type {module:esri/views/ui/DefaultUI}
*
* @memberof module:esri/views/DOMContainer
* @autocast
*
* @example
* var toggle = new BasemapToggle({
* view: view,
* nextBasemap: "hybrid"
* });
* // Adds an instance of BasemapToggle widget to the
* // top right of the view.
* view.ui.add(toggle, "top-right");
*
* @example
* // Moves the zoom and BasemapToggle widgets to the
* // bottom left of the view.
* view.ui.move([ "zoom", toggle ], "bottom-left");
*
* @example
* // Removes all the widgets from the bottom left of the view
* view.ui.empty("bottom-left");
*
* @example
* // Removes the compass widget from the view
* view.ui.remove("compass");
*/
//----------------------------------
// width
//----------------------------------
/**
* The width of the view in pixels read from the view container element.
*
* The view container needs to have a width greater than 0 to be displayed.
*
* @name width
* @type {number}
*
* @memberof module:esri/views/DOMContainer
* @readonly
* @default 0
*/
////////////////////////////////////////////////////////////
//
// Events
//
////////////////////////////////////////////////////////////
//----------------------------------
// resize
//----------------------------------
/**
* Fires when the view's size changes.
*
* @event module:esri/views/View#resize
*
* @property {number} oldWidth - The previous view width in pixels
* @property {number} oldHeight - The previous view height in pixels
* @property {number} width - The new measured view width in pixels
* @property {number} height - The new measured view height in pixels
*
* @see {@link module:esri/views/MapView#size size}
* @see {@link module:esri/views/MapView#height height}
* @see {@link module:esri/views/MapView#width width}
*/