From cfc800e626b7ca514d22d0747208fd576a559b00 Mon Sep 17 00:00:00 2001 From: "Vink, S.A. (Sjoerd)" <s.a.vink@uu.nl> Date: Tue, 9 Jul 2024 10:34:39 +0200 Subject: [PATCH] feat(map_nodelink): cleanup --- .../choropleth-layer/ChoroplethLayer.tsx | 2 +- .../lib/vis/visualizations/mapvis/mapvis.tsx | 4 -- .../vis/visualizations/mapvis/mapvis.types.ts | 41 ------------------- 3 files changed, 1 insertion(+), 46 deletions(-) diff --git a/libs/shared/lib/vis/visualizations/mapvis/layers/choropleth-layer/ChoroplethLayer.tsx b/libs/shared/lib/vis/visualizations/mapvis/layers/choropleth-layer/ChoroplethLayer.tsx index 2e02d5004..065e675b5 100644 --- a/libs/shared/lib/vis/visualizations/mapvis/layers/choropleth-layer/ChoroplethLayer.tsx +++ b/libs/shared/lib/vis/visualizations/mapvis/layers/choropleth-layer/ChoroplethLayer.tsx @@ -171,7 +171,7 @@ export class ChoroplethLayer extends CompositeLayer<LayerProps> { } renderLayers() { - const { graph, config, visible, hoverObject, isSelecting, getNodeLocation } = this.props; + const { graph, config, hoverObject, isSelecting, getNodeLocation } = this.props; const { data, selected } = this.state; const layers: any = []; diff --git a/libs/shared/lib/vis/visualizations/mapvis/mapvis.tsx b/libs/shared/lib/vis/visualizations/mapvis/mapvis.tsx index e7f2bfb9f..edd2fcb24 100644 --- a/libs/shared/lib/vis/visualizations/mapvis/mapvis.tsx +++ b/libs/shared/lib/vis/visualizations/mapvis/mapvis.tsx @@ -69,10 +69,8 @@ export const MapVis = ({ data, settings, handleSelect, graphMetadata }: Visualiz const newLayerId = `layer-${Date.now()}`; setLayer({ - id: newLayerId, type: layerType, config: settings, - visible: true, }); setLayerIds((prevIds) => [...prevIds, newLayerId]); @@ -96,9 +94,7 @@ export const MapVis = ({ data, settings, handleSelect, graphMetadata }: Visualiz ); return new layer.type({ - id: `${layer.id}`, graph: data, - visible: layer.visible, metaData: graphMetadata, config: settings, selected: selected, diff --git a/libs/shared/lib/vis/visualizations/mapvis/mapvis.types.ts b/libs/shared/lib/vis/visualizations/mapvis/mapvis.types.ts index 8156ce3b5..8293fbbfc 100644 --- a/libs/shared/lib/vis/visualizations/mapvis/mapvis.types.ts +++ b/libs/shared/lib/vis/visualizations/mapvis/mapvis.types.ts @@ -4,40 +4,9 @@ export interface LayerProps { [key: string]: any; } -export interface GeoJSONData { - type: string; - features: any[]; -} - export type Layer = { - id: string; type: any; config: any; - visible: boolean; -}; - -export type GraphType = { - getNode(id: string): Node | null; - getNodes(): Node[]; - getNodeLocation(id: string): Coordinate | null; - getEdge(id: string): Edge | null; - getEdges(): Edge[]; - consumeMessageFromBackend(queryResult: { nodes: Node[]; edges: Edge[] }): void; - getGraphInfo(): { - nodeAttributes: { [attribute: string]: any }; - edgeAttributes: { [attribute: string]: any }; - }; -}; - -export type GeoNode = { - id: string; - attributes: { - long: number; - lat: number; - [key: string]: any; - }; - connectedEdges: string[]; - [key: string]: any; }; export type Node = { @@ -51,16 +20,6 @@ export type Node = { [key: string]: any; }; -export type GeoEdge = { - id: string; - from: string; - to: string; - attributes: { - [key: string]: any; - }; - [key: string]: any; -}; - export type Edge = { id: string; from: string; -- GitLab