Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions docs/Camera.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,9 @@ The zoom level of the map.
### padding

```tsx
type Padding = {
paddingLeft: number; /* Left padding in points */
paddingRight: number; /* Right padding in points */
paddingTop: number; /* Top padding in points */
paddingBottom: number; /* Bottom padding in points */
}
Partial
```
The viewport padding in points.
The viewport padding in points. Individual edges may be omitted.



Expand Down Expand Up @@ -218,7 +213,7 @@ compatibility; the root `padding` prop should be used instead. */
heading: number; /* Heading (bearing, orientation) of the map, measured in degrees clockwise from true north. */
pitch: number; /* The pitch toward the horizon measured in degrees, with 0 degrees resulting in a top-down view for a two-dimensional map. */
zoomLevel: number; /* The zoom level of the map. */
padding: signature; /* The viewport padding in points. */
padding: Partial; /* The viewport padding in points. Individual edges may be omitted. */
animationDuration: number; /* The duration the map takes to animate to a new configuration. */
animationMode: 'flyTo' \| 'easeTo' \| 'linearTo' \| 'moveTo' \| 'none'; /* The easing or path the camera uses to animate to a new configuration. */
}
Expand Down
40 changes: 4 additions & 36 deletions docs/docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -793,41 +793,9 @@
{
"name": "padding",
"required": false,
"type": {
"name": "shape",
"value": [
{
"name": "paddingLeft",
"required": true,
"type": "number",
"default": "none",
"description": "Left padding in points"
},
{
"name": "paddingRight",
"required": true,
"type": "number",
"default": "none",
"description": "Right padding in points"
},
{
"name": "paddingTop",
"required": true,
"type": "number",
"default": "none",
"description": "Top padding in points"
},
{
"name": "paddingBottom",
"required": true,
"type": "number",
"default": "none",
"description": "Bottom padding in points"
}
]
},
"type": "Partial",
"default": "none",
"description": "The viewport padding in points."
"description": "The viewport padding in points. Individual edges may be omitted."
},
{
"name": "animationDuration",
Expand Down Expand Up @@ -975,9 +943,9 @@
{
"name": "padding",
"required": false,
"type": "signature",
"type": "Partial",
"default": "none",
"description": "The viewport padding in points."
"description": "The viewport padding in points. Individual edges may be omitted."
},
{
"name": "animationDuration",
Expand Down
4 changes: 2 additions & 2 deletions src/components/Camera.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@ export type CameraStop = {
pitch?: number;
/** The zoom level of the map. */
zoomLevel?: number;
/** The viewport padding in points. */
padding?: CameraPadding;
/** The viewport padding in points. Individual edges may be omitted. */
padding?: Partial<CameraPadding>;
/** The duration the map takes to animate to a new configuration. */
animationDuration?: number;
/** The easing or path the camera uses to animate to a new configuration. */
Expand Down