]> Repositorios git - classgraph.git/commitdiff
Don't recolor the focused type-family node
authorJavier Sagredo <[email protected]>
Wed, 6 May 2026 22:07:56 +0000 (00:07 +0200)
committerJavier Sagredo <[email protected]>
Wed, 6 May 2026 22:07:56 +0000 (00:07 +0200)
The [?focused] cytoscape rule used to paint every focused node dark
blue, which on the amber family node left dark-on-dark text that
couldn't be read. Split the rule: class nodes still go navy; family
nodes keep their amber palette and indicate focus via a thicker brown
border and larger text.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
data/viewer.js

index 02760436271304dd27b645bce7a85d8d621a818b..01e13a1aa7c5abfc5132097855cc8f0352977a1d 100644 (file)
           opacity: 0.85,
         },
       },
-      // Focused class in instance view
+      // Focused class in instance view: darken the class colour for
+      // emphasis. Restricted to class nodes so we don't clobber the
+      // family node's amber background (which has dark text — repainting
+      // it dark blue makes the label illegible).
       {
-        selector: 'node[?focused]',
+        selector: 'node[kind = "class"][?focused]',
         style: {
           'background-color': '#1e3a8a',
           'border-color': '#1e3a8a',
           'font-size': 14,
         },
       },
+      // Focused family in family view: keep the family's own amber
+      // colours; emphasise via a thicker brown border + larger text.
+      {
+        selector: 'node[kind = "family"][?focused]',
+        style: {
+          'border-color': '#92400e',
+          'border-width': 3,
+          'font-size': 14,
+        },
+      },
       // Instance node
       {
         selector: 'node[kind = "instance"]',