From 9d2e91853aa54750d0059615aa0f2736c1bd6e7b Mon Sep 17 00:00:00 2001 From: ParryQiu Date: Fri, 28 Aug 2020 16:19:16 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20ExtrudePolyLine=20?= =?UTF-8?q?=E5=AF=B9=E5=BA=94=E7=9A=84=E5=8D=95=E5=85=83=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/line/path/demo/road_light.js | 8 ++++---- .../layers/src/utils/__tests__/extrude_polyline.spec.ts | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/line/path/demo/road_light.js b/examples/line/path/demo/road_light.js index 779ac51a8d..743ce809b4 100644 --- a/examples/line/path/demo/road_light.js +++ b/examples/line/path/demo/road_light.js @@ -9,7 +9,7 @@ import { const scene = new Scene({ id: 'map', map: new Mapbox({ - center: [116.3956, 39.9392], + center: [ 116.3956, 39.9392 ], pitch: 0, zoom: 10, rotation: 0, @@ -18,15 +18,15 @@ const scene = new Scene({ }); scene.on('loaded', () => { fetch( - 'https://gw.alipayobjects.com/os/basement_prod/0d2f0113-f48b-4db9-8adc-a3937243d5a3.json' - ) + 'https://gw.alipayobjects.com/os/basement_prod/0d2f0113-f48b-4db9-8adc-a3937243d5a3.json' + ) .then(res => res.json()) .then(data => { const layer = new LineLayer({}) .source(data) .size(1.5) .shape('line') - .color('标准名称', ['#5B8FF9', '#5CCEA1', '#5D7092']); + .color('标准名称', [ '#5B8FF9', '#5CCEA1', '#5D7092' ]); scene.addLayer(layer); }); }); diff --git a/packages/layers/src/utils/__tests__/extrude_polyline.spec.ts b/packages/layers/src/utils/__tests__/extrude_polyline.spec.ts index c2ce9a7eb7..9cea6c49ce 100644 --- a/packages/layers/src/utils/__tests__/extrude_polyline.spec.ts +++ b/packages/layers/src/utils/__tests__/extrude_polyline.spec.ts @@ -18,6 +18,6 @@ describe('extrude polyline', () => { coord[1] = lat; }); const mesh = extrude.extrude(coords); - expect(mesh.indices.length).toBe(12); + expect(mesh.indices.length).toBe(6); }); });