diff --git a/packages/composite-layers/__tests__/unit/composite-layers/bubble-layer/index.test.ts b/packages/composite-layers/__tests__/unit/composite-layers/bubble-layer/index.test.ts index b1bd4afd1..4510a8039 100644 --- a/packages/composite-layers/__tests__/unit/composite-layers/bubble-layer/index.test.ts +++ b/packages/composite-layers/__tests__/unit/composite-layers/bubble-layer/index.test.ts @@ -1,5 +1,5 @@ -import { getLayerStyleAttribute } from '../../../helper/layer'; import { BubbleLayer } from '../../../../src/composite-layers/bubble-layer'; +import { getLayerStyleAttribute } from '../../../helper/layer'; describe('bubble layer', () => { const layer = new BubbleLayer({ @@ -85,7 +85,7 @@ describe('bubble layer', () => { attributeField: 'label', attributeValues: 'text', }); - expect(layer.labelLayer.layer['rawConfig']).toMatchObject({ + expect(layer.labelLayer.layer['needUpdateConfig']).toMatchObject({ opacity: 0.6, textAnchor: 'top', textOffset: [0, 20], @@ -98,7 +98,7 @@ describe('bubble layer', () => { }); it('style', () => { - expect(layer.fillLayer.layer['rawConfig']).toMatchObject({ + expect(layer.fillLayer.layer['needUpdateConfig']).toMatchObject({ opacity: 1, strokeWidth: 1, stroke: 'red', @@ -114,7 +114,7 @@ describe('bubble layer', () => { attributeName: 'size', attributeField: 12, }); - expect(layer.highlightStrokeLayer.layer['rawConfig']).toMatchObject({ + expect(layer.highlightStrokeLayer.layer['needUpdateConfig']).toMatchObject({ opacity: 0, strokeWidth: 1.5, stroke: 'green', @@ -125,7 +125,7 @@ describe('bubble layer', () => { attributeName: 'size', attributeField: 12, }); - expect(layer.selectStrokeLayer.layer['rawConfig']).toMatchObject({ + expect(layer.selectStrokeLayer.layer['needUpdateConfig']).toMatchObject({ opacity: 0, strokeWidth: 1.5, stroke: 'yellow', diff --git a/packages/composite-layers/__tests__/unit/composite-layers/choropleth-layer/index.test.ts b/packages/composite-layers/__tests__/unit/composite-layers/choropleth-layer/index.test.ts index 0e8088ee6..94d61e474 100644 --- a/packages/composite-layers/__tests__/unit/composite-layers/choropleth-layer/index.test.ts +++ b/packages/composite-layers/__tests__/unit/composite-layers/choropleth-layer/index.test.ts @@ -1,5 +1,5 @@ -import { getLayerStyleAttribute } from '../../../helper/layer'; import { ChoroplethLayer } from '../../../../src/composite-layers/choropleth-layer'; +import { getLayerStyleAttribute } from '../../../helper/layer'; describe('choropleth layer', () => { const layer = new ChoroplethLayer({ @@ -86,7 +86,7 @@ describe('choropleth layer', () => { attributeField: 'label', attributeValues: 'text', }); - expect(layer.labelLayer.layer['rawConfig']).toMatchObject({ + expect(layer.labelLayer.layer['needUpdateConfig']).toMatchObject({ opacity: 0.6, textAnchor: 'top', textOffset: [0, 20], @@ -99,9 +99,9 @@ describe('choropleth layer', () => { }); it('style', () => { - expect(layer.fillLayer.layer['rawConfig']).toMatchObject({ opacity: 1 }); + expect(layer.fillLayer.layer['needUpdateConfig']).toMatchObject({ opacity: 1 }); - expect(layer.strokeLayer.layer['rawConfig']).toMatchObject({ opacity: 1 }); + expect(layer.strokeLayer.layer['needUpdateConfig']).toMatchObject({ opacity: 1 }); expect(getLayerStyleAttribute(layer.strokeLayer.layer['pendingStyleAttributes'], 'color')).toEqual({ attributeName: 'color', attributeField: 'rgb(93,112,146)', @@ -124,7 +124,7 @@ describe('choropleth layer', () => { attributeName: 'size', attributeField: 1.5, }); - expect(layer.highlightStrokeLayer.layer['rawConfig']).toMatchObject({ opacity: 0.8 }); + expect(layer.highlightStrokeLayer.layer['needUpdateConfig']).toMatchObject({ opacity: 0.8 }); expect(getLayerStyleAttribute(layer.selectStrokeLayer.layer['pendingStyleAttributes'], 'color')).toEqual({ attributeName: 'color', @@ -134,6 +134,6 @@ describe('choropleth layer', () => { attributeName: 'size', attributeField: 1.5, }); - expect(layer.selectStrokeLayer.layer['rawConfig']).toMatchObject({ opacity: 0.8 }); + expect(layer.selectStrokeLayer.layer['needUpdateConfig']).toMatchObject({ opacity: 0.8 }); }); }); diff --git a/packages/composite-layers/__tests__/unit/core-layers/heatmap-layer/index.test.ts b/packages/composite-layers/__tests__/unit/core-layers/heatmap-layer/index.test.ts index af62a43ed..494a48550 100644 --- a/packages/composite-layers/__tests__/unit/core-layers/heatmap-layer/index.test.ts +++ b/packages/composite-layers/__tests__/unit/core-layers/heatmap-layer/index.test.ts @@ -1,5 +1,5 @@ -import { getLayerStyleAttribute } from '../../../helper/layer'; import { HeatmapLayer } from '../../../../src/core-layers/heatmap-layer'; +import { getLayerStyleAttribute } from '../../../helper/layer'; describe('heatmap layer', () => { const layer = new HeatmapLayer({ @@ -41,7 +41,7 @@ describe('heatmap layer', () => { }); it('style', () => { - expect(layer.layer['rawConfig']).toMatchObject({ + expect(layer.layer['needUpdateConfig']).toMatchObject({ intensity: 3, radius: 20, opacity: 1, diff --git a/packages/composite-layers/__tests__/unit/core-layers/line-layer/index.test.ts b/packages/composite-layers/__tests__/unit/core-layers/line-layer/index.test.ts index ab32012da..bbca7e527 100644 --- a/packages/composite-layers/__tests__/unit/core-layers/line-layer/index.test.ts +++ b/packages/composite-layers/__tests__/unit/core-layers/line-layer/index.test.ts @@ -1,5 +1,5 @@ -import { getLayerStyleAttribute } from '../../../helper/layer'; import { LineLayer } from '../../../../src/core-layers/line-layer'; +import { getLayerStyleAttribute } from '../../../helper/layer'; describe('line layer', () => { const layer = new LineLayer({ @@ -38,7 +38,7 @@ describe('line layer', () => { }); it('style', () => { - expect(layer.layer['rawConfig']).toMatchObject({ opacity: 1, lineType: 'dash' }); + expect(layer.layer['needUpdateConfig']).toMatchObject({ opacity: 1, lineType: 'dash' }); }); it('state', () => { diff --git a/packages/composite-layers/__tests__/unit/core-layers/point-layer/index.test.ts b/packages/composite-layers/__tests__/unit/core-layers/point-layer/index.test.ts index 0db979b11..108622b1d 100644 --- a/packages/composite-layers/__tests__/unit/core-layers/point-layer/index.test.ts +++ b/packages/composite-layers/__tests__/unit/core-layers/point-layer/index.test.ts @@ -1,5 +1,5 @@ -import { getLayerStyleAttribute } from '../../../helper/layer'; import { PointLayer } from '../../../../src/core-layers/point-layer'; +import { getLayerStyleAttribute } from '../../../helper/layer'; describe('point layer', () => { const layer = new PointLayer({ @@ -38,7 +38,7 @@ describe('point layer', () => { }); it('style', () => { - expect(layer.layer['rawConfig']).toMatchObject({ opacity: 1, strokeWidth: 1, stroke: 'red' }); + expect(layer.layer['needUpdateConfig']).toMatchObject({ opacity: 1, strokeWidth: 1, stroke: 'red' }); }); it('state', () => { diff --git a/packages/composite-layers/__tests__/unit/core-layers/polygon-layer/index.test.ts b/packages/composite-layers/__tests__/unit/core-layers/polygon-layer/index.test.ts index b9db25032..e5f6d9923 100644 --- a/packages/composite-layers/__tests__/unit/core-layers/polygon-layer/index.test.ts +++ b/packages/composite-layers/__tests__/unit/core-layers/polygon-layer/index.test.ts @@ -1,5 +1,5 @@ -import { getLayerStyleAttribute } from '../../../helper/layer'; import { PolygonLayer } from '../../../../src/core-layers/polygon-layer'; +import { getLayerStyleAttribute } from '../../../helper/layer'; describe('polygon layer', () => { const layer = new PolygonLayer({ @@ -42,7 +42,7 @@ describe('polygon layer', () => { }); it('style', () => { - expect(layer.layer['rawConfig']).toMatchObject({ opacity: 1 }); + expect(layer.layer['needUpdateConfig']).toMatchObject({ opacity: 1 }); }); it('state', () => { diff --git a/packages/composite-layers/__tests__/unit/core-layers/text-layer/index.test.ts b/packages/composite-layers/__tests__/unit/core-layers/text-layer/index.test.ts index f32b1d2df..ffa8fac7a 100644 --- a/packages/composite-layers/__tests__/unit/core-layers/text-layer/index.test.ts +++ b/packages/composite-layers/__tests__/unit/core-layers/text-layer/index.test.ts @@ -1,5 +1,5 @@ -import { getLayerStyleAttribute } from '../../../helper/layer'; import { TextLayer } from '../../../../src/core-layers/text-layer'; +import { getLayerStyleAttribute } from '../../../helper/layer'; describe('text layer', () => { const layer = new TextLayer({ @@ -48,7 +48,7 @@ describe('text layer', () => { }); it('style', () => { - expect(layer.layer['rawConfig']).toMatchObject({ + expect(layer.layer['needUpdateConfig']).toMatchObject({ opacity: 0.6, textAnchor: 'top', textOffset: [0, 20], diff --git a/packages/l7plot/__tests__/unit/adaptor/layer/index.spec.ts b/packages/l7plot/__tests__/unit/adaptor/layer/index.spec.ts index 3d96355f8..a0ab82634 100644 --- a/packages/l7plot/__tests__/unit/adaptor/layer/index.spec.ts +++ b/packages/l7plot/__tests__/unit/adaptor/layer/index.spec.ts @@ -1,8 +1,7 @@ import { Source } from '@antv/l7'; -import { getLayerStyleAttribute } from '../../../helper/layer'; -import { DotLayer } from '../../../../src/layers/dot-layer'; -import { DotLayerOptions } from '../../../../src/layers/dot-layer'; +import { DotLayer, DotLayerOptions } from '../../../../src/layers/dot-layer'; import { LinesLayer, LinesLayerOptions } from '../../../../src/layers/lines-layer'; +import { getLayerStyleAttribute } from '../../../helper/layer'; describe('mapping layer', () => { const source = new Source([], { parser: { type: 'json', x: 'x', y: 'y' } }); @@ -132,7 +131,7 @@ describe('mapping layer', () => { expect(plotLayer.layer.type).toBe('PointLayer'); - expect(plotLayer.layer['rawConfig']).toMatchObject({ opacity: 1, strokeWidth: 1, stroke: 'red' }); + expect(plotLayer.layer['needUpdateConfig']).toMatchObject({ opacity: 1, strokeWidth: 1, stroke: 'red' }); }); it('mapping state', () => { diff --git a/packages/l7plot/__tests__/unit/layers/arc-layer/index.test.ts b/packages/l7plot/__tests__/unit/layers/arc-layer/index.test.ts index 039b35405..c33633181 100644 --- a/packages/l7plot/__tests__/unit/layers/arc-layer/index.test.ts +++ b/packages/l7plot/__tests__/unit/layers/arc-layer/index.test.ts @@ -1,5 +1,5 @@ -import { getLayerStyleAttribute } from '../../../helper/layer'; import { ArcLayer } from '../../../../src/layers/arc-layer'; +import { getLayerStyleAttribute } from '../../../helper/layer'; describe('arc layer', () => { const layer = new ArcLayer({ @@ -37,7 +37,7 @@ describe('arc layer', () => { }); it('style', () => { - expect(layer.layer['rawConfig']).toMatchObject({ opacity: 1 }); + expect(layer.layer['needUpdateConfig']).toMatchObject({ opacity: 1 }); }); it('state', () => { diff --git a/packages/l7plot/__tests__/unit/layers/area-layer/index.test.ts b/packages/l7plot/__tests__/unit/layers/area-layer/index.test.ts index 345fa5d17..dc2af616e 100644 --- a/packages/l7plot/__tests__/unit/layers/area-layer/index.test.ts +++ b/packages/l7plot/__tests__/unit/layers/area-layer/index.test.ts @@ -1,5 +1,5 @@ -import { getLayerStyleAttribute } from '../../../helper/layer'; import { AreaLayer } from '../../../../src/layers/area-layer'; +import { getLayerStyleAttribute } from '../../../helper/layer'; describe('area layer', () => { const layer = new AreaLayer({ @@ -57,7 +57,7 @@ describe('area layer', () => { }); it('style', () => { - expect(layer.layer['rawConfig']).toMatchObject({ opacity: 1 }); + expect(layer.layer['needUpdateConfig']).toMatchObject({ opacity: 1 }); }); it('state', () => { @@ -69,7 +69,7 @@ describe('area layer', () => { attributeName: 'size', attributeField: 1.5, }); - expect(layer.highlightLayer['rawConfig']).toMatchObject({ opacity: 0.8 }); + expect(layer.highlightLayer['needUpdateConfig']).toMatchObject({ opacity: 0.8 }); expect(getLayerStyleAttribute(layer.selectStrokeLayer['pendingStyleAttributes'], 'color')).toEqual({ attributeName: 'color', attributeField: 'yellow', @@ -78,6 +78,6 @@ describe('area layer', () => { attributeName: 'size', attributeField: 1.5, }); - expect(layer.selectStrokeLayer['rawConfig']).toMatchObject({ opacity: 0.8 }); + expect(layer.selectStrokeLayer['needUpdateConfig']).toMatchObject({ opacity: 0.8 }); }); }); diff --git a/packages/l7plot/__tests__/unit/layers/dot-layer/index.test.ts b/packages/l7plot/__tests__/unit/layers/dot-layer/index.test.ts index 5a050505f..bebe0c57b 100644 --- a/packages/l7plot/__tests__/unit/layers/dot-layer/index.test.ts +++ b/packages/l7plot/__tests__/unit/layers/dot-layer/index.test.ts @@ -1,6 +1,6 @@ import { Source } from '@antv/l7'; -import { getLayerStyleAttribute } from '../../../helper/layer'; import { DotLayer } from '../../../../src/layers/dot-layer'; +import { getLayerStyleAttribute } from '../../../helper/layer'; describe('dot layer', () => { const layer = new DotLayer({ @@ -39,7 +39,7 @@ describe('dot layer', () => { }); it('style', () => { - expect(layer.layer['rawConfig']).toMatchObject({ opacity: 1, strokeWidth: 1, stroke: 'red' }); + expect(layer.layer['needUpdateConfig']).toMatchObject({ opacity: 1, strokeWidth: 1, stroke: 'red' }); }); it('state', () => { diff --git a/packages/l7plot/__tests__/unit/layers/grid-layer/index.test.ts b/packages/l7plot/__tests__/unit/layers/grid-layer/index.test.ts index adeaff9df..fad58a597 100644 --- a/packages/l7plot/__tests__/unit/layers/grid-layer/index.test.ts +++ b/packages/l7plot/__tests__/unit/layers/grid-layer/index.test.ts @@ -1,5 +1,5 @@ -import { getLayerStyleAttribute } from '../../../helper/layer'; import { GridLayer } from '../../../../src/layers/grid-layer'; +import { getLayerStyleAttribute } from '../../../helper/layer'; describe('grid layer', () => { const layer = new GridLayer({ @@ -57,7 +57,7 @@ describe('grid layer', () => { }); it('style', () => { - expect(layer.layer['rawConfig']).toMatchObject({ + expect(layer.layer['needUpdateConfig']).toMatchObject({ coverage: 0.8, angle: 0, opacity: 1.0, diff --git a/packages/l7plot/__tests__/unit/layers/heatmap-layer/index.test.ts b/packages/l7plot/__tests__/unit/layers/heatmap-layer/index.test.ts index c89ad2ea5..c77a5d567 100644 --- a/packages/l7plot/__tests__/unit/layers/heatmap-layer/index.test.ts +++ b/packages/l7plot/__tests__/unit/layers/heatmap-layer/index.test.ts @@ -1,6 +1,6 @@ import { Source } from '@antv/l7'; -import { getLayerStyleAttribute } from '../../../helper/layer'; import { HeatmapLayer } from '../../../../src/layers/heatmap-layer'; +import { getLayerStyleAttribute } from '../../../helper/layer'; describe('heatmap layer', () => { const layer = new HeatmapLayer({ @@ -46,7 +46,7 @@ describe('heatmap layer', () => { }); it('style', () => { - expect(layer.layer['rawConfig']).toMatchObject({ + expect(layer.layer['needUpdateConfig']).toMatchObject({ intensity: 3, radius: 20, opacity: 1, diff --git a/packages/l7plot/__tests__/unit/layers/hexbin-layer/index.test.ts b/packages/l7plot/__tests__/unit/layers/hexbin-layer/index.test.ts index e56b23482..0ae29c709 100644 --- a/packages/l7plot/__tests__/unit/layers/hexbin-layer/index.test.ts +++ b/packages/l7plot/__tests__/unit/layers/hexbin-layer/index.test.ts @@ -1,5 +1,5 @@ -import { getLayerStyleAttribute } from '../../../helper/layer'; import { HexbinLayer } from '../../../../src/layers/hexbin-layer'; +import { getLayerStyleAttribute } from '../../../helper/layer'; describe('hexagon layer', () => { const layer = new HexbinLayer({ @@ -56,7 +56,7 @@ describe('hexagon layer', () => { }); it('style', () => { - expect(layer.layer['rawConfig']).toMatchObject({ + expect(layer.layer['needUpdateConfig']).toMatchObject({ coverage: 0.8, angle: 0, opacity: 1.0, diff --git a/packages/l7plot/__tests__/unit/layers/icon-layer/index.test.ts b/packages/l7plot/__tests__/unit/layers/icon-layer/index.test.ts index 18a8fa1d0..bce58dc01 100644 --- a/packages/l7plot/__tests__/unit/layers/icon-layer/index.test.ts +++ b/packages/l7plot/__tests__/unit/layers/icon-layer/index.test.ts @@ -1,7 +1,7 @@ import { Source } from '@antv/l7'; -import { getLayerStyleAttribute } from '../../../helper/layer'; -import { IconLayer } from '../../../../src/layers/icon-layer'; import { registerImages } from '../../../../src'; +import { IconLayer } from '../../../../src/layers/icon-layer'; +import { getLayerStyleAttribute } from '../../../helper/layer'; describe('icon layer', () => { const images = [ @@ -45,7 +45,7 @@ describe('icon layer', () => { }); it('style', () => { - expect(layer.layer['rawConfig']).toMatchObject({ opacity: 1, strokeWidth: 1, stroke: 'red' }); + expect(layer.layer['needUpdateConfig']).toMatchObject({ opacity: 1, strokeWidth: 1, stroke: 'red' }); }); it('state', () => { diff --git a/packages/l7plot/__tests__/unit/layers/lines-layer/index.test.ts b/packages/l7plot/__tests__/unit/layers/lines-layer/index.test.ts index 0060fa0be..7d790ebe3 100644 --- a/packages/l7plot/__tests__/unit/layers/lines-layer/index.test.ts +++ b/packages/l7plot/__tests__/unit/layers/lines-layer/index.test.ts @@ -1,5 +1,5 @@ -import { getLayerStyleAttribute } from '../../../helper/layer'; import { LinesLayer } from '../../../../src/layers/lines-layer'; +import { getLayerStyleAttribute } from '../../../helper/layer'; describe('lines layer', () => { const layer = new LinesLayer({ @@ -38,7 +38,7 @@ describe('lines layer', () => { }); it('style', () => { - expect(layer.layer['rawConfig']).toMatchObject({ opacity: 1, lineType: 'dash' }); + expect(layer.layer['needUpdateConfig']).toMatchObject({ opacity: 1, lineType: 'dash' }); }); it('state', () => { diff --git a/packages/l7plot/__tests__/unit/layers/path-layer/index.test.ts b/packages/l7plot/__tests__/unit/layers/path-layer/index.test.ts index fa9e60989..f5e843e66 100644 --- a/packages/l7plot/__tests__/unit/layers/path-layer/index.test.ts +++ b/packages/l7plot/__tests__/unit/layers/path-layer/index.test.ts @@ -1,5 +1,5 @@ -import { getLayerStyleAttribute } from '../../../helper/layer'; import { PathLayer } from '../../../../src/layers/path-layer'; +import { getLayerStyleAttribute } from '../../../helper/layer'; describe('path layer', () => { const layer = new PathLayer({ @@ -37,7 +37,7 @@ describe('path layer', () => { }); it('style', () => { - expect(layer.layer['rawConfig']).toMatchObject({ opacity: 1, lineType: 'dash' }); + expect(layer.layer['needUpdateConfig']).toMatchObject({ opacity: 1, lineType: 'dash' }); }); it('state', () => { diff --git a/packages/l7plot/__tests__/unit/layers/prism-layer/index.test.ts b/packages/l7plot/__tests__/unit/layers/prism-layer/index.test.ts index e3ff07021..4194a9500 100644 --- a/packages/l7plot/__tests__/unit/layers/prism-layer/index.test.ts +++ b/packages/l7plot/__tests__/unit/layers/prism-layer/index.test.ts @@ -1,5 +1,5 @@ -import { getLayerStyleAttribute } from '../../../helper/layer'; import { PrismLayer } from '../../../../src/layers/prism-layer'; +import { getLayerStyleAttribute } from '../../../helper/layer'; describe('prism layer', () => { const layer = new PrismLayer({ @@ -43,7 +43,7 @@ describe('prism layer', () => { }); it('style', () => { - expect(layer.layer['rawConfig']).toMatchObject({ opacity: 1 }); + expect(layer.layer['needUpdateConfig']).toMatchObject({ opacity: 1 }); }); it('state', () => { diff --git a/packages/l7plot/__tests__/unit/layers/text-layer/index.test.ts b/packages/l7plot/__tests__/unit/layers/text-layer/index.test.ts index 615c1f9d3..ad6d98850 100644 --- a/packages/l7plot/__tests__/unit/layers/text-layer/index.test.ts +++ b/packages/l7plot/__tests__/unit/layers/text-layer/index.test.ts @@ -1,6 +1,6 @@ import { Source } from '@antv/l7'; -import { getLayerStyleAttribute } from '../../../helper/layer'; import { TextLayer } from '../../../../src/layers/text-layer'; +import { getLayerStyleAttribute } from '../../../helper/layer'; describe('text layer', () => { const layer = new TextLayer({ @@ -49,7 +49,7 @@ describe('text layer', () => { }); it('style', () => { - expect(layer.layer['rawConfig']).toMatchObject({ + expect(layer.layer['needUpdateConfig']).toMatchObject({ opacity: 0.6, textAnchor: 'top', textOffset: [0, 20],