You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Add deck.gl widgets 9.2 test apps
Renamed and added new example apps for deck.gl widgets 9.2, including single and multi-view setups. Upgraded dependencies to @deck.gl/core, @deck.gl/layers, and @deck.gl/widgets v9.2.0-beta.1. Refactored LayerListWidget to extend Widget from @deck.gl/core.
* fix: zoom transitions in non-geo views
* fix: reset in multi-view apps
* add: button text to theme
* fix: animate and design fps widget
* fix: gimbal in non-default views and multi-views
* fix: timeline themed icon
* fix: stats update on redraw
* fix: loading status was flipped
* stylesheet
* Add --button-text-color CSS variable to docs
Documents the new --button-text-color variable in the widget styling reference, including its default value and link to CSS color documentation.
* types on IconButton
* Refactor widget types for view state support
Updated Widget and ResetViewWidget to support generic view state types using ViewOrViews and ViewStateMap. Matches `Deck`'s initialViewState type
* Update test/apps/widgets-multi-view-9.2/package.json
Co-authored-by: felixpalmer <[email protected]>
* Update test/apps/widgets-9.2/package.json
Co-authored-by: felixpalmer <[email protected]>
* Add documentation for widgets with multiple views
Introduces a new section explaining how to position widgets relative to deck.gl views using `viewId` and `placement` props. Provides example configuration and HTML structure, along with remarks and references to related guides.
* Add data filtering to GeoJsonLayer with timeline control
Introduces DataFilterExtension to the GeoJsonLayer, enabling dynamic filtering based on the 'scalerank' property. The timeline widget now updates the filter range interactively, allowing users to control visible features by time.
* Refactor button components for improved type safety and fix lints
* Add customizable --menu-gap CSS variable for menus
* Refactor IconMenu to use elements instead of icon functions
Updated IconMenu and related usage to accept JSX elements for icons instead of icon functions. Adjusted menu item definitions and rendering logic accordingly, and replaced inline menu styles with class-based styling and ButtonGroup/GroupedIconButton components for improved structure and maintainability.
---------
Co-authored-by: felixpalmer <[email protected]>
Copy file name to clipboardExpand all lines: docs/api-reference/widgets/overview.md
+53Lines changed: 53 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -125,6 +125,59 @@ new Deck({
125
125
});
126
126
```
127
127
128
+
### Using with Multiple Views
129
+
130
+
Widgets with UI (e.g. a button or panel) can be positioned relative to the deck.gl view they are controlling, via the `viewId` and `placement` props. See [WidgetProps](../core/widget.md#widgetprops).
131
+
132
+
The `viewId` controls which HTML container will mount to, and the `placement` prop will position it relative to the container it is in, like so:
133
+
134
+
```ts
135
+
newDeck({
136
+
views:[
137
+
newMapView({id: 'left-map'}),
138
+
newMapView({id: 'right-map'})
139
+
],
140
+
widgets: [
141
+
newFullscreenWidget({placement: 'top-right'}),
142
+
newZoomWidget({viewId: 'left-map'}),
143
+
newGimbalWidget({viewId: 'right-map'}),
144
+
]
145
+
})
146
+
```
147
+
148
+
This configuration will result in the following HTML structure:
149
+
150
+
```html
151
+
<!-- map container -->
152
+
<divclass="deck-widget-container">
153
+
<canvasid="deckgl-overlay">
154
+
<!-- size of full map container -->
155
+
<div>
156
+
<divclass="top-right">
157
+
</FullscreenWidget>
158
+
</div>
159
+
</div>
160
+
<!-- size and position of the "left-map" view -->
161
+
<div>
162
+
<divclass="top-left">
163
+
</ZoomWidget>
164
+
</div>
165
+
</div>
166
+
<!-- size and position of the "right-map" view -->
167
+
<div>
168
+
<divclass="top-left">
169
+
</GimbalWidget>
170
+
</div>
171
+
</div>
172
+
</div>
173
+
```
174
+
175
+
Remarks:
176
+
177
+
* Widgets in the default container will be overlapped by view-specific widgets.
178
+
* Widget UI with dynamic positioning, such as an `InfoWidget`, may not expose the `placement` prop as they control positioning internally.
179
+
* For more information about using multiple deck.gl views, see the [Using Multiple Views](../../developer-guide/views.md#using-multiple-views) guide.
0 commit comments