Fit Bounds
The camera that fits rows into the render surface: wire its view state or its bounds into the deck or a View State. The bounds are computed in DuckDB.
Syntax
{ "id": "n1", "op": "fit-bounds", "name": "fit-bounds", "x": 0, "y": 0, "params": {} }
One out of it starts at "sourcePort": "viewState"; a parameter is set in params (leave out the ones at their default), driven by an edge to par:padding, or read elsewhere as ch('fit-bounds/padding').
Inputs
This operator has no input ports.
Parameters
| Parameter | Kind | Default | Choices |
|---|---|---|---|
data | field | ||
position | expr | "" | |
padding | float | 0 |
Outputs
| Port | Type |
|---|---|
viewState | value |
longitude | number |
latitude | number |
zoom | number |
bounds | value |
Details
- Category: Output
- Operator:
fit-bounds
Older projects
Projects saved before documents used operator classes. These convert to fit-bounds when they open: BoundingBoxOp.