Skip to content

Commit a05ecaf

Browse files
committed
Added default color for route edges
1 parent 5544d3a commit a05ecaf

File tree

3 files changed

+22
-10
lines changed

3 files changed

+22
-10
lines changed

package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,11 @@
372372
"default": "#0288d1",
373373
"description": "The default color of the edges representing components using other components."
374374
},
375+
"angularTools.edges.routeEdgeColor": {
376+
"type": "string",
377+
"default": "#FF8C00",
378+
"description": "The default color of the edges representing routes."
379+
},
375380
"angularTools.packageJsonMarkdownFilename": {
376381
"type": "string",
377382
"default": "ReadMe-PackagesJson.md",

src/config.ts

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,19 @@ export class Config {
2525
public get dgmlGraphLayout(): string { return this.getSetting<string>('dgmlGraph.graphLayout', 'Sugiyama'); }
2626
public get dgmlGraphDirection(): string { return this.getSetting<string>('dgmlGraph.graphDirection', 'LeftToRight'); }
2727
public readonly dgmlZoomLevel = '-1';
28-
28+
2929
// DependencyInjectionGraph
3030
public get dependencyInjectionPngFilename(): string { return this.getSetting<string>('dependencyInjectionGraph.pngGraphFilename', 'DependencyInjectionGraph.png'); }
3131
public get dependencyInjectionDgmlGraphFilename(): string { return this.getSetting<string>('dependencyInjectionGraph.dgmlGraphFilename', 'DependencyInjectionGraph.dgml'); }
3232
public get dependencyInjectionDotGraphFilename(): string { return this.getSetting<string>('dependencyInjectionGraph.dotGraphFilename', 'DependencyInjectionGraph.dot'); }
3333
public get dependencyInjectionEdgeArrowToType(): string { return this.getSetting<string>('dependencyInjectionGraph.edgeArrowToType', 'triangle'); }
34-
34+
3535
// ShowComponentHierarchy
3636
public get componentHierarchyPngFilename(): string { return this.getSetting<string>('showComponentHierarchy.componentHierarchyPngFilename', 'ComponentHierarchy.png'); }
3737
public get componentHierarchyDgmlGraphFilename(): string { return this.getSetting<string>('showComponentHierarchy.componentHierarchyDgmlGraphFilename', 'ComponentHierarchy.dgml'); }
3838
public get componentHierarchyDotGraphFilename(): string { return this.getSetting<string>('showComponentHierarchy.componentHierarchyDotGraphFilename', 'ComponentHierarchy.dot'); }
3939
public get componentHierarchyEdgeArrowToType(): string { return this.getSetting<string>('showComponentHierarchy.edgeArrowToType', 'triangle'); }
40-
40+
4141
// ShowModuleHierarchy
4242
public get moduleHierarchyPngFilename(): string { return this.getSetting<string>('showModuleHierarchy.moduleHierarchyPngFilename', 'ModuleHierarchy.png'); }
4343
public get moduleHierarchyDgmlGraphFilename(): string { return this.getSetting<string>('showModuleHierarchy.moduleHierarchyDgmlGraphFilename', 'ModuleHierarchy.dgml'); }
@@ -49,27 +49,28 @@ export class Config {
4949
public get graphSelectionGuidelineWidth(): number { return this.getSetting<number>('graphSelection.graphSelectionGuidelineWidth', 1); }
5050
public get graphSelectionColor(): string { return this.getSetting<string>('graphSelection.graphSelectionColor', '#e53935'); }
5151
public get graphSelectionWidth(): number { return this.getSetting<number>('graphSelection.graphSelectionWidth', 2); }
52-
52+
5353
// GraphNodes
5454
public get rootNodeBackgroundColor(): string { return this.getSetting<string>('graphNodes.rootNodeBackgroundColor', '#3abc3f'); }
5555
public get rootNodeShape(): string { return this.getSetting<string>('graphNodes.rootNodeShape', 'box'); }
56-
public get componentNodeBackgroundColor(): string { return this.getSetting<string>('graphNodes.componentNodeBackgroundColor', '#0288d1');}
56+
public get componentNodeBackgroundColor(): string { return this.getSetting<string>('graphNodes.componentNodeBackgroundColor', '#0288d1'); }
5757
public get componentNodeShape(): string { return this.getSetting<string>('graphNodes.componentNodeShape', 'box'); }
58-
public get moduleNodeBackgroundColor(): string { return this.getSetting<string>('graphNodes.moduleNodeBackgroundColor', '#e53935');}
58+
public get moduleNodeBackgroundColor(): string { return this.getSetting<string>('graphNodes.moduleNodeBackgroundColor', '#e53935'); }
5959
public get moduleNodeShape(): string { return this.getSetting<string>('graphNodes.moduleNodeShape', 'box'); }
60-
public get pipeNodeBackgroundColor(): string { return this.getSetting<string>('graphNodes.pipeNodeBackgroundColor', '#00897b');}
60+
public get pipeNodeBackgroundColor(): string { return this.getSetting<string>('graphNodes.pipeNodeBackgroundColor', '#00897b'); }
6161
public get pipeNodeShape(): string { return this.getSetting<string>('graphNodes.pipeNodeShape', 'box'); }
62-
public get directiveNodeBackgroundColor(): string { return this.getSetting<string>('graphNodes.directiveNodeBackgroundColor', '#ffc107');}
62+
public get directiveNodeBackgroundColor(): string { return this.getSetting<string>('graphNodes.directiveNodeBackgroundColor', '#ffc107'); }
6363
public get directiveNodeShape(): string { return this.getSetting<string>('graphNodes.directiveNodeShape', 'box'); }
6464
public get injectableNodeBackgroundColor(): string { return this.getSetting<string>('graphNodes.injectableNodeBackgroundColor', '#97c2fc'); }
6565
public get injectableNodeShape(): string { return this.getSetting<string>('graphNodes.injectableNodeShape', 'box'); }
6666
public get maximumNodeLabelLength(): number { return this.getSetting<number>('graphNodes.maximumNodeLabelLength', -1); }
67-
67+
6868
// Edges
6969
public get importEdgeColor(): string { return this.getSetting<string>('edges.importEdgeColor', '#43a047'); }
7070
public get exportEdgeColor(): string { return this.getSetting<string>('edges.exportEdgeColor', '#0288d1'); }
7171
public get injectableEdgeColor(): string { return this.getSetting<string>('edges.exportEdgeColor', '#0288d1'); }
7272
public get usesEdgeColor(): string { return this.getSetting<string>('edges.exportEdgeColor', '#0288d1'); }
73+
public get routeEdgeColor(): string { return this.getSetting<string>('edges.routeEdgeColor', '#0288d1'); }
7374

7475
// Popups
7576
public get showPopupsOverNodesAndEdges(): boolean { return this.getSetting<boolean>('showPopupsOverNodesAndEdges', true); }
@@ -84,5 +85,5 @@ export class Config {
8485
public get componentHierarchyMarkdownFilename(): string { return this.getSetting<string>('componentHierarchyMarkdownFilename', 'ComponentHierarchy.md'); }
8586

8687
// ModulesMarkdown
87-
public get modulesToMarkdownFilename(): string {return this.getSetting<string>('modulesToMarkdownFilename', 'Modules.md'); }
88+
public get modulesToMarkdownFilename(): string { return this.getSetting<string>('modulesToMarkdownFilename', 'Modules.md'); }
8889
}

src/model/Edge.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ export class Edge {
4242
case ArrowType.uses:
4343
jsStringProperties.push(`title: "${this.source} uses ${this.target}"`);
4444
break;
45+
case ArrowType.route:
46+
jsStringProperties.push(`title: "${this.source} routes to ${this.target}"`);
47+
break;
4548
default:
4649
break;
4750
}
@@ -80,6 +83,9 @@ export class Edge {
8083
case ArrowType.uses:
8184
edgeTypeColor = this.config.usesEdgeColor;
8285
break;
86+
case ArrowType.route:
87+
edgeTypeColor = this.config.routeEdgeColor;
88+
break;
8389
default:
8490
edgeTypeColor = '';
8591
break;

0 commit comments

Comments
 (0)