From 8428ab8980bd29793313b796b86e0fa5a342affc Mon Sep 17 00:00:00 2001 From: thinkinggis Date: Sun, 25 Apr 2021 16:24:33 +0800 Subject: [PATCH] fix: lint --- README.md | 1 + packages/source/src/source.ts | 11 +++-------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 3e6a1fbd73..3c3d75e3b1 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # L7 + . [![travis ci](https://travis-ci.com/antvis/L7.svg?branch=master)](https://travis-ci.com/antvis/L7) [![](https://flat.badgen.net/npm/v/@antv/l7?icon=npm)](https://www.npmjs.com/package/@antv/l7) ![最近提交](https://badgen.net/github/last-commit/antvis/L7) diff --git a/packages/source/src/source.ts b/packages/source/src/source.ts index c334c94cee..b8cbe602c5 100644 --- a/packages/source/src/source.ts +++ b/packages/source/src/source.ts @@ -11,11 +11,7 @@ import { lazyInject, TYPES, } from '@antv/l7-core'; -import { - bBoxToBounds, - extent, - padBounds, -} from '@antv/l7-utils'; +import { bBoxToBounds, extent, padBounds } from '@antv/l7-utils'; import { BBox, Feature, @@ -181,7 +177,6 @@ export default class Source extends EventEmitter { ]; if (!this.invalidExtent) { - newBounds = padBounds(bBoxToBounds(this.extent), bufferRatio); } return newBounds[0].concat(newBounds[1]); @@ -214,8 +209,8 @@ export default class Source extends EventEmitter { this.data = sourceParser(this.originData, parser); // 计算范围 this.extent = extent(this.data.dataArray); - this.invalidExtent = this.extent[0]===this.extent[2] || this.extent[1]===this.extent[3] - + this.invalidExtent = + this.extent[0] === this.extent[2] || this.extent[1] === this.extent[3]; } /** * 数据统计