From 281bc8f78f594afca44256ff4ba0c98a5182c14e Mon Sep 17 00:00:00 2001 From: thinkinggis Date: Wed, 10 Jun 2020 20:43:18 +0800 Subject: [PATCH] docs: update docs --- docs/api/layer/layer.en.md | 9 +++++++-- docs/api/layer/layer.zh.md | 9 +++++++-- packages/l7/src/version.ts | 2 +- stories/Components/components/Zoom.tsx | 11 ++++++++--- 4 files changed, 23 insertions(+), 8 deletions(-) diff --git a/docs/api/layer/layer.en.md b/docs/api/layer/layer.en.md index 3953d4d5ce..54aabf1e2b 100644 --- a/docs/api/layer/layer.en.md +++ b/docs/api/layer/layer.en.md @@ -10,7 +10,12 @@ L7 Layer 接口设计遵循图形语法,所有图层都继承于该基类。 语法示例 ```javascript -const layer = new Layer(option).source().color().size().shape().style(); +const layer = new Layer(option) + .source() + .color() + .size() + .shape() + .style(); scene.addLayer(layer); ``` @@ -78,7 +83,7 @@ layer.source(data, { transforms: [ { type: 'map', - callback: function (item) { + callback: function(item) { const [x, y] = item.coordinates; item.lat = item.lat * 1; item.lng = item.lng * 1; diff --git a/docs/api/layer/layer.zh.md b/docs/api/layer/layer.zh.md index 0003c027d6..e0bf8abf2f 100644 --- a/docs/api/layer/layer.zh.md +++ b/docs/api/layer/layer.zh.md @@ -10,7 +10,12 @@ L7 Layer 接口设计遵循图形语法,所有图层都继承于该基类。 语法示例 ```javascript -const layer = new Layer(option).source().color().size().shape().style(); +const layer = new Layer(option) + .source() + .color() + .size() + .shape() + .style(); scene.addLayer(layer); ``` @@ -82,7 +87,7 @@ layer.source(data, { transforms: [ { type: 'map', - callback: function (item) { + callback: function(item) { const [x, y] = item.coordinates; item.lat = item.lat * 1; item.lng = item.lng * 1; diff --git a/packages/l7/src/version.ts b/packages/l7/src/version.ts index 55f144c5b4..cb8ece48c8 100644 --- a/packages/l7/src/version.ts +++ b/packages/l7/src/version.ts @@ -1,2 +1,2 @@ -const version = '2.2.11'; +const version = '2.2.12'; export { version }; diff --git a/stories/Components/components/Zoom.tsx b/stories/Components/components/Zoom.tsx index 4bd12be5bb..372383b75e 100644 --- a/stories/Components/components/Zoom.tsx +++ b/stories/Components/components/Zoom.tsx @@ -30,9 +30,14 @@ export default class ZoomComponent extends React.Component { this.scene = scene; const layer = new PolygonLayer({}); - layer.source(data).color('#fff').shape('name', 'text').size(16).style({ - opacity: 1.0, - }); + layer + .source(data) + .color('#fff') + .shape('name', 'text') + .size(16) + .style({ + opacity: 1.0, + }); scene.addLayer(layer); const zoomControl = new Zoom({ position: 'bottomright',