@@ -154,6 +154,7 @@ function createForceGraph(popupId, containerName, dot) {
154154 var nodeData = graphlibGraph.node(node);
155155 nodes.push({
156156 id: node,
157+ label: graphlibGraph.node(node).label || node,
157158 color: nodeData.color || 'white',
158159 });
159160 });
@@ -189,7 +190,7 @@ function createForceGraph(popupId, containerName, dot) {
189190
190191 const Graph = new ForceGraph3D(container)
191192 .graphData(gData)
192- .nodeLabel('id ')
193+ .nodeLabel('label ')
193194 .width(container.clientWidth)
194195 .height(container.clientHeight);
195196
@@ -199,7 +200,7 @@ function createForceGraph(popupId, containerName, dot) {
199200
200201 // use node labels instead of spheres
201202 Graph.nodeThreeObject(node => {
202- const sprite = new SpriteText(node.id );
203+ const sprite = new SpriteText(node.label );
203204 sprite.material.depthWrite = false; // make sprite background transparent
204205 sprite.color = node.color;
205206 sprite.textHeight = 4;
@@ -612,14 +613,15 @@ private void renderClassVertices(
612613
613614 dot .append (" [" );
614615 dot .append (hyperlinkClassForDot (vertex , repoUrl , codebaseGraphDTO ));
615- if (className .contains ("$" )) {
616- dot .append (" label=\" " ).append (escapeDotQuoted (className )).append ("\" " );
617- } else if (isAnonymousFqn (vertex )) {
616+
617+ if (isAnonymousFqn (vertex )) {
618618 // Kotlin "<anonymous>" renders under the enclosing source file's base name as the
619619 // owner with $ as the enclosing-class separator (escaped for DOT).
620620 dot .append (" label=\" " )
621621 .append (escapeDotQuoted (anonymousOwnerLabel (vertex , codebaseGraphDTO )))
622622 .append ("\" " );
623+ } else {
624+ dot .append (" label=\" " ).append (escapeDotQuoted (className )).append ("\" " );
623625 }
624626
625627 if (classesToRemove .contains (vertex )) {
0 commit comments