Commit 8cb577c
authored
Group Genmapper Colors (#2891)
* Enhance D3.js Genmap Visualization and CSS Adjustments
- Updated CSS to prevent static fill color for node text, allowing dynamic color assignment via JavaScript.
- Reduced font size for node titles and adjusted max-width for better text fitting.
- Introduced constants for node dimensions in JavaScript to improve maintainability and prevent text clipping.
- Added functions for calculating text color based on background luminance to ensure better contrast and readability.
* Refactor genmap status color resolution into ensureStatusColor helper
Eliminates ~9 duplicate inline status color resolution blocks across both render paths by extracting a shared ensureStatusColor() helper. Removes redundant .style('fill') calls and stale CSS comments.1 parent 45779ae commit 8cb577c
3 files changed
Lines changed: 145 additions & 151 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
74 | 73 | | |
75 | 74 | | |
76 | 75 | | |
77 | 76 | | |
78 | 77 | | |
79 | 78 | | |
80 | 79 | | |
81 | | - | |
| 80 | + | |
82 | 81 | | |
83 | | - | |
84 | | - | |
| 82 | + | |
85 | 83 | | |
86 | 84 | | |
87 | 85 | | |
| |||
336 | 334 | | |
337 | 335 | | |
338 | 336 | | |
339 | | - | |
| 337 | + | |
340 | 338 | | |
341 | 339 | | |
342 | 340 | | |
| |||
0 commit comments