Skip to content

Commit f3b4fd3

Browse files
committed
fix: 调整 Sprite 加载处理函数公共导出
- 通过 common 公共入口导出 createSpriteLoadHandler - 移除触发构建导出检查失败的深路径重新导出 - 补充公共入口导出测试 AI-GEN: 90% gpt5.6-luna
1 parent 7d99ba0 commit f3b4fd3

3 files changed

Lines changed: 4 additions & 2 deletions

File tree

‎src/common/index.common.js‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -753,4 +753,5 @@ export { KeyServiceParameter, SecurityManager, ServerInfo, TokenServiceParameter
753753
export { CartoCSS, ThemeStyle };
754754
export { ElasticSearch };
755755
export { Lang };
756-
export { KnowledgeGraph } from './overlay/KnowledgeGraph';
756+
export { KnowledgeGraph } from './overlay/KnowledgeGraph';
757+
export { createSpriteLoadHandler } from './mapping/WebMapV3';

‎src/mapboxgl/mapping/index.js‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
export { WebMap } from './WebMap';
22
export { initMap } from './InitMap';
33
export { VideoMap } from './VideoMap';
4-
export { createSpriteLoadHandler } from '@supermapgis/iclient-common/mapping/WebMapV3';

‎test/common/mapping/WebMapV3Spec.js‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { createWebMapV3Extending } from '../../../src/common/mapping/WebMapV3';
22
import { createSpriteLoadHandler } from '../../../src/common/mapping';
3+
import { createSpriteLoadHandler as createPublicSpriteLoadHandler } from '../../../src/common/index.common';
34
import { createWebMapBaseExtending } from '../../../src/common/mapping/WebMapBase';
45
import { Events } from '../../../src/common/commontypes';
56

@@ -135,6 +136,7 @@ describe('WebMapV3 - addLocalIdeographFontFamily', () => {
135136
it('should be exported for external WebApps', () => {
136137
expect(createSpriteLoadHandler('3.3.7')).toEqual(jasmine.any(Function));
137138
expect(createSpriteLoadHandler('3.3.8')).toBeUndefined();
139+
expect(createPublicSpriteLoadHandler).toBe(createSpriteLoadHandler);
138140
});
139141

140142
it('should flip line sprites for maps at version 3.3.7', () => {

0 commit comments

Comments
 (0)