Skip to content

Commit 00706a3

Browse files
[fix]修复经纬网测试 review by songym
1 parent 47e667d commit 00706a3

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

test/mapboxgl/overlay/GraticuleLayerSpec.js

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ describe('mapboxgl_GraticuleLayer', () => {
4343
beforeEach(() => {
4444
originalTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL;
4545
jasmine.DEFAULT_TIMEOUT_INTERVAL = 50000;
46-
if (!map.getLayer('sm-graticule-layer')) {
46+
if (!map.getLayer('graticuleLayer_1')) {
4747
graticuleLayer = new GraticuleLayer(map);
4848
graticuleLayer.onAdd(map);
4949
}
@@ -54,8 +54,8 @@ describe('mapboxgl_GraticuleLayer', () => {
5454
});
5555

5656
afterAll(() => {
57-
if (map.getLayer('sm-graticule-layer')) {
58-
map.removeLayer('sm-graticule-layer');
57+
if (map.getLayer('graticuleLayer_1')) {
58+
map.removeLayer('graticuleLayer_1');
5959
}
6060
document.body.removeChild(testDiv);
6161
map = null;
@@ -75,10 +75,10 @@ describe('mapboxgl_GraticuleLayer', () => {
7575

7676
it('setVisibility', () => {
7777
graticuleLayer.setVisibility(false);
78-
var visible = map.getLayoutProperty('sm-graticule-layer', 'visibility');
78+
var visible = map.getLayoutProperty('graticuleLayer_1', 'visibility');
7979
expect(visible).toBe('none');
8080
graticuleLayer.setVisibility(true);
81-
visible = map.getLayoutProperty('sm-graticule-layer', 'visibility');
81+
visible = map.getLayoutProperty('graticuleLayer_1', 'visibility');
8282
expect(visible).toBe('visible');
8383
});
8484

@@ -98,7 +98,10 @@ describe('mapboxgl_GraticuleLayer', () => {
9898
});
9999

100100
it('setExtent', () => {
101-
graticuleLayer.setExtent([[0, 0], [50, 50]]);
101+
graticuleLayer.setExtent([
102+
[0, 0],
103+
[50, 50]
104+
]);
102105
expect(graticuleLayer.options.extent[0]).toEqual(0);
103106
expect(graticuleLayer.options.extent[3]).toEqual(50);
104107
});

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy