Skip to content

Commit

Permalink
feat: answer fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
duxinyue.dxy committed Dec 19, 2024
1 parent 0af0f50 commit 9045e5b
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 53 deletions.
7 changes: 0 additions & 7 deletions packages/li-editor/src/hooks/useScene.ts

This file was deleted.

4 changes: 2 additions & 2 deletions packages/li-editor/src/services/app-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,9 @@ class AppService {
}

/**
* 获取图层实例
* 获取地图实例
*/
public getLayerById(id: string) {
public getInstanceLayerById(id: string) {
const { layersStore } = this.runtimeApp.stateManager;
const layerManager = layersStore.getLayerManager();
return layerManager?.getLayerById(id);
Expand Down
3 changes: 1 addition & 2 deletions packages/li-editor/src/utils/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
export * from './dataset-parser';
export * from './validator';
export * from './widget';
export * from './dataset';
export * from './spec';
export { getGeoFields, getPointFieldPairs } from './dataset';

export const requestIdleCallback =
window.requestIdleCallback ||
Expand Down
6 changes: 3 additions & 3 deletions packages/li-editor/src/utils/spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import type { EditorDataset } from '../services/editor-dataset-manager';
import type { LayerBounds } from '../types';
import { getDefaultColorField, getGeometrysBounds, getLatLngBounds } from './dataset';

export const LayerColorRibbon = COLOR_RANGES.filter((i) => i.type === 'sequential' && i.colors.length === 4).map(
const LayerColorRibbon = COLOR_RANGES.filter((i) => i.type === 'sequential' && i.colors.length === 4).map(
(i) => i.colors,
);

export const colorRibbonMaker = (function* (): Generator<string[], void> {
const colorRibbonMaker = (function* (): Generator<string[], void> {
let index = 0;
while (index < LayerColorRibbon.length + 1) {
if (index === LayerColorRibbon.length) {
Expand All @@ -21,7 +21,7 @@ export const colorRibbonMaker = (function* (): Generator<string[], void> {
}
})();

export const getLayerFillColor = (colorField: DatasetField | undefined) => {
const getLayerFillColor = (colorField: DatasetField | undefined) => {
const curr = colorRibbonMaker.next();
const colors = curr.done ? LayerColorRibbon[0] : curr.value;

Expand Down
4 changes: 1 addition & 3 deletions packages/li-sdk/src/hooks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,4 @@ export * from './useLayerList';
export * from './useLayerManager';
export * from './useScene';
export * from './useWidgetProps';
export * from './useDatasetUpdate';
export * from './useLayerUpdate';
export * from './internal';
export { useStateManager } from './internal';
18 changes: 0 additions & 18 deletions packages/li-sdk/src/hooks/useDatasetUpdate.ts

This file was deleted.

18 changes: 0 additions & 18 deletions packages/li-sdk/src/hooks/useLayerUpdate.ts

This file was deleted.

0 comments on commit 9045e5b

Please sign in to comment.