diff --git a/src/app/cartography/cartography.module.ts b/src/app/cartography/cartography.module.ts index 93a24a5d..676d0eef 100644 --- a/src/app/cartography/cartography.module.ts +++ b/src/app/cartography/cartography.module.ts @@ -1,6 +1,11 @@ import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; +import { MatMenuModule, MatIconModule } from '@angular/material'; + import { MapComponent } from './components/map/map.component'; +import { DrawLinkToolComponent } from './components/draw-link-tool/draw-link-tool.component'; +import { NodeSelectInterfaceComponent } from './components/node-select-interface/node-select-interface.component'; + import { CssFixer } from './helpers/css-fixer'; import { FontFixer } from './helpers/font-fixer'; import { MultiLinkCalculatorHelper } from './helpers/multi-link-calculator-helper'; @@ -8,26 +13,9 @@ import { SvgToDrawingConverter } from './helpers/svg-to-drawing-converter'; import { QtDasharrayFixer } from './helpers/qt-dasharray-fixer'; import { LayersManager } from './managers/layers-manager'; import { MapChangeDetectorRef } from './services/map-change-detector-ref'; -import { GraphLayout } from './widgets/graph-layout'; -import { LinksWidget } from './widgets/links'; -import { NodesWidget } from './widgets/nodes'; -import { DrawingsWidget } from './widgets/drawings'; -import { DrawingLineWidget } from './widgets/drawing-line'; -import { SelectionTool } from './tools/selection-tool'; -import { MovingTool } from './tools/moving-tool'; -import { LayersWidget } from './widgets/layers'; -import { LinkWidget } from './widgets/link'; -import { InterfaceStatusWidget } from './widgets/interface-status'; -import { InterfaceLabelWidget } from './widgets/interface-label'; -import { EllipseDrawingWidget } from './widgets/drawings/ellipse-drawing'; -import { ImageDrawingWidget } from './widgets/drawings/image-drawing'; -import { RectDrawingWidget } from './widgets/drawings/rect-drawing'; -import { TextDrawingWidget } from './widgets/drawings/text-drawing'; -import { LineDrawingWidget } from './widgets/drawings/line-drawing'; import { Context } from './models/context'; -import { DrawLinkToolComponent } from './components/draw-link-tool/draw-link-tool.component'; -import { NodeSelectInterfaceComponent } from './components/node-select-interface/node-select-interface.component'; -import { MatMenuModule, MatIconModule } from '@angular/material'; +import { D3_MAP_IMPORTS } from './d3-map.imports'; + @NgModule({ imports: [ @@ -48,23 +36,8 @@ import { MatMenuModule, MatIconModule } from '@angular/material'; QtDasharrayFixer, LayersManager, MapChangeDetectorRef, - GraphLayout, - LinksWidget, - NodesWidget, - DrawingsWidget, - DrawingLineWidget, - SelectionTool, - MovingTool, - LayersWidget, - LinkWidget, - InterfaceStatusWidget, - InterfaceLabelWidget, - EllipseDrawingWidget, - ImageDrawingWidget, - LineDrawingWidget, - RectDrawingWidget, - TextDrawingWidget, Context, + ...D3_MAP_IMPORTS ], exports: [MapComponent] }) diff --git a/src/app/cartography/d3-map.imports.ts b/src/app/cartography/d3-map.imports.ts new file mode 100644 index 00000000..1cc89ab2 --- /dev/null +++ b/src/app/cartography/d3-map.imports.ts @@ -0,0 +1,35 @@ +import { GraphLayout } from './widgets/graph-layout'; +import { LinksWidget } from './widgets/links'; +import { NodesWidget } from './widgets/nodes'; +import { DrawingsWidget } from './widgets/drawings'; +import { DrawingLineWidget } from './widgets/drawing-line'; +import { SelectionTool } from './tools/selection-tool'; +import { MovingTool } from './tools/moving-tool'; +import { LayersWidget } from './widgets/layers'; +import { LinkWidget } from './widgets/link'; +import { InterfaceStatusWidget } from './widgets/interface-status'; +import { InterfaceLabelWidget } from './widgets/interface-label'; +import { EllipseDrawingWidget } from './widgets/drawings/ellipse-drawing'; +import { ImageDrawingWidget } from './widgets/drawings/image-drawing'; +import { RectDrawingWidget } from './widgets/drawings/rect-drawing'; +import { TextDrawingWidget } from './widgets/drawings/text-drawing'; +import { LineDrawingWidget } from './widgets/drawings/line-drawing'; + +export const D3_MAP_IMPORTS = [ + GraphLayout, + LinksWidget, + NodesWidget, + DrawingsWidget, + DrawingLineWidget, + SelectionTool, + MovingTool, + LayersWidget, + LinkWidget, + InterfaceStatusWidget, + InterfaceLabelWidget, + EllipseDrawingWidget, + ImageDrawingWidget, + LineDrawingWidget, + RectDrawingWidget, + TextDrawingWidget, +];