Skip to content

Commit b20e0ef

Browse files
committed
Remove duplicate TopoViewerState definitions
1 parent 8f19c8f commit b20e0ef

File tree

3 files changed

+26
-40
lines changed

3 files changed

+26
-40
lines changed

src/topoViewer/common/state.ts

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,7 @@
1-
export interface TopoViewerState {
2-
cy: any;
3-
selectedNode: any;
4-
selectedEdge: any;
5-
linkEndpointVisibility: boolean;
6-
nodeContainerStatusVisibility: boolean;
7-
labName: string;
8-
prefixName: string;
9-
multiLayerViewPortState: boolean;
10-
isGeoMapInitialized: boolean;
11-
isPanel01Cy: boolean;
12-
nodeClicked: boolean;
13-
edgeClicked: boolean;
14-
deploymentType: string;
15-
cytoscapeLeafletMap: any;
16-
cytoscapeLeafletLeaf: any;
17-
}
1+
import type { TopoViewerState } from './types/topoViewerState';
182

193
export const topoViewerState: TopoViewerState = {
20-
cy: undefined,
4+
cy: null,
215
selectedNode: null,
226
selectedEdge: null,
237
linkEndpointVisibility: true,
@@ -30,6 +14,6 @@ export const topoViewerState: TopoViewerState = {
3014
nodeClicked: false,
3115
edgeClicked: false,
3216
deploymentType: '',
33-
cytoscapeLeafletMap: undefined,
34-
cytoscapeLeafletLeaf: undefined,
17+
cytoscapeLeafletMap: null,
18+
cytoscapeLeafletLeaf: null,
3519
};
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import type cytoscape from 'cytoscape';
2+
3+
export interface TopoViewerState {
4+
cy: cytoscape.Core | null;
5+
selectedNode: string | null;
6+
selectedEdge: string | null;
7+
linkEndpointVisibility: boolean;
8+
nodeContainerStatusVisibility: boolean;
9+
labName: string;
10+
prefixName: string;
11+
multiLayerViewPortState: boolean;
12+
isGeoMapInitialized: boolean;
13+
isPanel01Cy: boolean;
14+
nodeClicked: boolean;
15+
edgeClicked: boolean;
16+
deploymentType: string;
17+
cytoscapeLeafletMap: any;
18+
cytoscapeLeafletLeaf: any;
19+
editorEngine?: any;
20+
}

src/topoViewer/common/webview-ui/state.ts

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,4 @@
1-
import type cytoscape from 'cytoscape';
2-
3-
export interface TopoViewerState {
4-
cy: cytoscape.Core | null;
5-
selectedNode: string | null;
6-
selectedEdge: string | null;
7-
linkEndpointVisibility: boolean;
8-
nodeContainerStatusVisibility: boolean;
9-
labName: string;
10-
prefixName: string;
11-
multiLayerViewPortState: boolean;
12-
isGeoMapInitialized: boolean;
13-
isPanel01Cy: boolean;
14-
nodeClicked: boolean;
15-
edgeClicked: boolean;
16-
deploymentType: string;
17-
cytoscapeLeafletMap: any;
18-
cytoscapeLeafletLeaf: any;
19-
editorEngine: any;
20-
}
1+
import type { TopoViewerState } from '../types/topoViewerState';
212

223
export const topoViewerState: TopoViewerState = {
234
cy: null,
@@ -52,6 +33,7 @@ export function resetState(): void {
5233
topoViewerState.deploymentType = '';
5334
topoViewerState.cytoscapeLeafletMap = null;
5435
topoViewerState.cytoscapeLeafletLeaf = null;
36+
topoViewerState.editorEngine = null;
5537
}
5638

5739
export default topoViewerState;

0 commit comments

Comments
 (0)