mirror of https://gitee.com/antv-l7/antv-l7
style: lint style
This commit is contained in:
parent
db3511b149
commit
2f78e56343
|
@ -74,7 +74,7 @@ const imageLayer = new PointLayer()
|
||||||
.shape('name', ['00', '01', '02'])
|
.shape('name', ['00', '01', '02'])
|
||||||
.style({
|
.style({
|
||||||
rotation: 0,
|
rotation: 0,
|
||||||
layerType: 'fillImage'
|
layerType: 'fillImage',
|
||||||
})
|
})
|
||||||
.active({
|
.active({
|
||||||
color: '#0ff',
|
color: '#0ff',
|
||||||
|
@ -103,27 +103,27 @@ function rotate() {
|
||||||
[在线案例](/zh/examples/point/image#fillimage)
|
[在线案例](/zh/examples/point/image#fillimage)
|
||||||
|
|
||||||
- rotate 方法
|
- rotate 方法
|
||||||
符号图的 fillimage 模式支持 rotate 方法根据数据映射旋转角度。
|
符号图的 fillimage 模式支持 rotate 方法根据数据映射旋转角度。
|
||||||
🌟 记得要把 style 中的 rotation 设为 0
|
🌟 记得要把 style 中的 rotation 设为 0
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
const imageLayer = new PointLayer()
|
const imageLayer = new PointLayer()
|
||||||
.source(data)
|
.source(data)
|
||||||
.shape('wind', wind => {
|
.shape('wind', (wind) => {
|
||||||
if (wind === 'up') {
|
if (wind === 'up') {
|
||||||
return 'arrBlue';
|
return 'arrBlue';
|
||||||
}
|
}
|
||||||
return 'arrRed';
|
return 'arrRed';
|
||||||
|
|
||||||
})
|
})
|
||||||
.rotate('r', r => Math.PI * r)
|
.rotate('r', (r) => Math.PI * r)
|
||||||
.size(15)
|
.size(15)
|
||||||
.style({
|
.style({
|
||||||
rotation: 0,
|
rotation: 0,
|
||||||
layerType: 'fillImage'
|
layerType: 'fillImage',
|
||||||
});
|
});
|
||||||
scene.addLayer(imageLayer);
|
scene.addLayer(imageLayer);
|
||||||
```
|
```
|
||||||
|
|
||||||
[在线案例](/zh/examples/point/image#monsoon)
|
[在线案例](/zh/examples/point/image#monsoon)
|
||||||
|
|
||||||
`markdown:docs/common/layer/base.md`
|
`markdown:docs/common/layer/base.md`
|
||||||
|
|
Loading…
Reference in New Issue