docs: 完善官网文档

This commit is contained in:
2912401452 2022-03-30 19:06:31 +08:00
parent 298bec190c
commit 61c082679a
7 changed files with 39 additions and 1 deletions

View File

@ -43,6 +43,8 @@ source(data, {
`markdown:docs/api/line_layer/features/linear.zh.md`
`markdown:docs/api/line_layer/features/dash.zh.md`
`markdown:docs/api/line_layer/features/animate.zh.md`
`markdown:docs/api/line_layer/features/texture.zh.md`

View File

@ -55,6 +55,8 @@ source(data, {
`markdown:docs/api/line_layer/features/linear.zh.md`
`markdown:docs/api/line_layer/features/dash.zh.md`
`markdown:docs/api/line_layer/features/animate.zh.md`
`markdown:docs/api/line_layer/features/texture.zh.md`

View File

@ -0,0 +1,27 @@
### 设置虚线
线图层通过在 style 中设置线的类型,同时指定虚线部分和实线部分
```javascript
const layer = new LineLayer({})
.source(data)
.size(1.5)
.shape('line')
.color('标准名称', ['#5B8FF9', '#5CCEA1', '#F6BD16'])
.active(true)
.style({
lineType: 'dash',
dashArray: [5, 5],
});
scene.addLayer(layer);
```
<img width="450px" style="display: block;margin: 0 auto;" alt="案例" src='https://gw.alipayobjects.com/mdn/rms_816329/afts/img/A*pb3FRZnaa0AAAAAAAAAAAAAAARQnAQ'>
- lineType
默认为 solid表示实线dash 表示虚线
- dashArray[len1: number, len2: number]
len1 实线长度
len2 间隔长度
[在线案例](../../../examples/line/arc#trip_arc_dark_linear)

View File

@ -39,6 +39,8 @@ source(data, {
`markdown:docs/api/line_layer/features/linear.zh.md`
`markdown:docs/api/line_layer/features/dash.zh.md`
`markdown:docs/api/line_layer/features/animate.zh.md`
`markdown:docs/api/line_layer/features/texture.zh.md`

View File

@ -83,6 +83,8 @@ lineLayer.size([1, 2]); // 宽度为1高度2
`markdown:docs/api/line_layer/features/linear.zh.md`
`markdown:docs/api/line_layer/features/dash.zh.md`
`markdown:docs/api/line_layer/features/animate.zh.md`
`markdown:docs/api/line_layer/features/texture.zh.md`

View File

@ -47,6 +47,8 @@ layer.size('height', []);
`markdown:docs/api/line_layer/features/linear.zh.md`
`markdown:docs/api/line_layer/features/dash.zh.md`
`markdown:docs/api/line_layer/features/border.zh.md`
`markdown:docs/api/line_layer/features/animate.zh.md`

View File

@ -98,7 +98,8 @@ fetch(
.then(res => res.json())
.then(data => {
const layer = new LineLayer({
zIndex: 0
zIndex: 0,
depth: true
})
.source(data)
.size(1)