Skip to content

Commit f45a9d0

Browse files
committed
New config setting for specifying the length when truncating long node labels.
1 parent b221f78 commit f45a9d0

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@
183183
},
184184
"angularTools.showModuleHierarchy.componentNodeShape": {
185185
"type": "string",
186-
"default": "ellipse",
186+
"default": "box",
187187
"enum": ["ellipse", "circle", "database", "box", "text", "diamond", "dot", "star", "triangle", "triangleDown", "hexagon", "square"],
188188
"description": "The default shape of the nodes representing components. Notice that 'ellipse','circle','database','box' and 'text' have the label inside the shape, the rest have the label outside the shape."
189189
},
@@ -230,6 +230,11 @@
230230
"default": "#0288d1",
231231
"description": "The default color of the edges representing exports."
232232
},
233+
"angularTools.showModuleHierarchy.maximumNodeLabelLength": {
234+
"type": "number",
235+
"default": "40",
236+
"description": "The maximum length of the label for the nodes in the hierarchy. If the class name, module definition, module imports, exports, directives or pipes are longer than the specified number of characters, it will be truncated to this length."
237+
},
233238
"angularTools.componentHierarchyMarkdownFilename": {
234239
"type": "string",
235240
"default": "ComponentHierarchy.md",

src/config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ export class Config {
5656
public get directiveNodeShape(): string { return this.getSetting<string>('showModuleHierarchy.directiveNodeShape', 'box'); }
5757
public get importEdgeColor(): string { return this.getSetting<string>('showModuleHierarchy.importEdgeColor', '#43a047'); }
5858
public get exportEdgeColor(): string { return this.getSetting<string>('showModuleHierarchy.exportEdgeColor', '#0288d1'); }
59+
public get maximumNodeLabelLength(): number { return this.getSetting<number>('showModuleHierarchy.maximumNodeLabelLength', 40); }
5960

6061
// ComponentHierarchyMarkdown
6162
public get componentHierarchyMarkdownFilename(): string { return this.getSetting<string>('componentHierarchyMarkdownFilename', 'ComponentHierarchy.md'); }

0 commit comments

Comments
 (0)