Skip to content

Commit

Permalink
docs: improve formatting (#490)
Browse files Browse the repository at this point in the history
* docs: omit empty arguments
* docs: improve section headlines
* docs: method signatures as code
* docs: restructure styles
* docs: styles toc and remove lines
* docs: codegen
* docs: style params as definition lists
* docs: add code to component headlines
  • Loading branch information
KiwiKilian authored Nov 13, 2024
1 parent 0e0de9a commit 885e67e
Show file tree
Hide file tree
Showing 30 changed files with 3,972 additions and 3,820 deletions.
12 changes: 6 additions & 6 deletions docs/Annotation.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<!-- DO NOT MODIFY! -->
<!-- This file is auto-generated from javascript/components/Annotation.tsx -->
## <MapLibreGL.Annotation />
###
# `<MapLibreGL.Annotation />`

### props

## Props
| Prop | Type | Default | Required | Description |
| ---- | :--: | :-----: | :------: | :----------: |
| id | `string` | `none` | `true` | FIX ME NO DESCRIPTION |
Expand All @@ -15,12 +15,12 @@
| icon | `string \| number \| object` | `none` | `false` | FIX ME NO DESCRIPTION |
| animationEasingFunction | `FIX ME UNKNOWN TYPE` | `Easing.linear` | `false` | FIX ME NO DESCRIPTION |

### methods
#### onPress(event)
## Methods
### `onPress(event)`



##### arguments
#### Arguments
| Name | Type | Required | Description |
| ---- | :--: | :------: | :----------: |
| `event` | `OnPressEvent` | `Yes` | undefined |
Expand Down
261 changes: 134 additions & 127 deletions docs/BackgroundLayer.md
Original file line number Diff line number Diff line change
@@ -1,159 +1,166 @@
<!-- DO NOT MODIFY! -->
<!-- This file is auto-generated from javascript/components/BackgroundLayer.tsx -->
## <MapLibreGL.BackgroundLayer />
###
# `<MapLibreGL.BackgroundLayer />`

### props

## Props
| Prop | Type | Default | Required | Description |
| ---- | :--: | :-----: | :------: | :----------: |
| style | `BackgroundLayerStyleProps` | `none` | `false` | Customizable style attributes |
| sourceID | `FIX ME UNKNOWN TYPE` | `MapLibreGL.StyleSource.DefaultSourceID` | `false` | FIX ME NO DESCRIPTION |


### styles
## Styles

* <a href="#name">visibility</a><br/>
* <a href="#name-1">backgroundColor</a><br/>
* <a href="#name-2">backgroundPattern</a><br/>
* <a href="#name-3">backgroundOpacity</a><br/>
* <a href="#name">`visibility`</a><br/>
* <a href="#name-1">`backgroundColor`</a><br/>
* <a href="#name-2">`backgroundPattern`</a><br/>
* <a href="#name-3">`backgroundOpacity`</a><br/>

___

#### Name
`visibility`
### `visibility`

#### Description
Whether this layer is displayed.

#### Type
`enum`
#### Default Value
`visible`

#### Supported Values
**visible** - The layer is shown.<br />
**none** - The layer is not shown.<br />



___

#### Name
`backgroundColor`
<dl>
<dt>Type</dt>
<dd>
<code>enum</code>
</dd>
<dt>Default Value</dt>
<dd><code>visible</code></dd>
<dt>Supported Values</dt>
<dd>
<ul>
<li>
<code>visible</code>: The layer is shown.
</li>
<li>
<code>none</code>: The layer is not shown.
</li>
</ul>
</dd>
</dl>



### `backgroundColor`

#### Description
The color with which the background will be drawn.

#### Type
`color`
#### Default Value
`#000000`


#### Disabled By
`backgroundPattern`

#### Expression

Parameters: `zoom`
___

#### Name

`backgroundColorTransition`

#### Description

The transition affecting any changes to this layer’s backgroundColor propery.

#### Type

`{ duration, delay }`

#### Units
`milliseconds`

#### Default Value
`{duration: 300, delay: 0}`


___

#### Name
`backgroundPattern`
<dl>
<dt>Type</dt>
<dd>
<code>color</code>
</dd>
<dt>Default Value</dt>
<dd><code>#000000</code></dd>
</ul>
</dd>
<dt>Disabled By</dt>
<dd><code>backgroundPattern</code></dd>
<dt>Expression Parameters</dt>
<dd><code>zoom</code></dd>
</dl>

### `backgroundColorTransition`

The transition affecting any changes to this layer’s backgroundColor property.

<dl>
<dt>Type</dt>
<dd>
<code>{ duration, delay }</code>
</dd>

<dt>Units</dt>
<dd>
<code>milliseconds</code>
</dd>

<dt>Default Value</dt>
<dd>
<code>{duration: 300, delay: 0}</code>
</dd>
</dl>


### `backgroundPattern`

#### Description
Name of image in sprite to use for drawing an image background. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoomDependent expressions will be evaluated only at integer zoom levels.

#### Type
`resolvedImage`
<dl>
<dt>Type</dt>
<dd>
<code>resolvedImage</code>
</dd>
</ul>
</dd>
<dt>Expression Parameters</dt>
<dd><code>zoom</code></dd>
</dl>

### `backgroundPatternTransition`

#### Expression
The transition affecting any changes to this layer’s backgroundPattern property.

Parameters: `zoom`
___
<dl>
<dt>Type</dt>
<dd>
<code>{ duration, delay }</code>
</dd>

#### Name
<dt>Units</dt>
<dd>
<code>milliseconds</code>
</dd>

`backgroundPatternTransition`
<dt>Default Value</dt>
<dd>
<code>{duration: 300, delay: 0}</code>
</dd>
</dl>

#### Description

The transition affecting any changes to this layer’s backgroundPattern propery.
### `backgroundOpacity`

#### Type

`{ duration, delay }`

#### Units
`milliseconds`

#### Default Value
`{duration: 300, delay: 0}`


___

#### Name
`backgroundOpacity`

#### Description
The opacity at which the background will be drawn.

#### Type
`number`
#### Default Value
`1`

#### Minimum
`0`


#### Maximum
`1`

#### Expression

Parameters: `zoom`
___

#### Name

`backgroundOpacityTransition`

#### Description

The transition affecting any changes to this layer’s backgroundOpacity propery.

#### Type

`{ duration, delay }`

#### Units
`milliseconds`

#### Default Value
`{duration: 300, delay: 0}`

<dl>
<dt>Type</dt>
<dd>
<code>number</code>
</dd>
<dt>Default Value</dt>
<dd><code>1</code></dd>
</ul>
</dd>
<dt>Minimum</dt>
<dd><code>0</code></dd>
<dt>Maximum</dt>
<dd><code>1</code></dd>
<dt>Expression Parameters</dt>
<dd><code>zoom</code></dd>
</dl>

### `backgroundOpacityTransition`

The transition affecting any changes to this layer’s backgroundOpacity property.

<dl>
<dt>Type</dt>
<dd>
<code>{ duration, delay }</code>
</dd>

<dt>Units</dt>
<dd>
<code>milliseconds</code>
</dd>

<dt>Default Value</dt>
<dd>
<code>{duration: 300, delay: 0}</code>
</dd>
</dl>

6 changes: 3 additions & 3 deletions docs/Callout.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<!-- DO NOT MODIFY! -->
<!-- This file is auto-generated from javascript/components/Callout.tsx -->
## <MapLibreGL.Callout />
### Callout that displays information about a selected annotation near the annotation.
# `<MapLibreGL.Callout />`
Callout that displays information about a selected annotation near the annotation.

### props
## Props
| Prop | Type | Default | Required | Description |
| ---- | :--: | :-----: | :------: | :----------: |
| title | `string` | `none` | `false` | String that get's displayed in the default callout. |
Expand Down
Loading

0 comments on commit 885e67e

Please sign in to comment.