style: lint style

This commit is contained in:
2912401452 2022-04-08 18:04:44 +08:00
parent db3511b149
commit 2f78e56343
1 changed files with 19 additions and 19 deletions

View File

@ -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`