From 53058ab94dd78b90adf3620da381f9b62eb1d3c6 Mon Sep 17 00:00:00 2001 From: ImBenji Date: Thu, 23 Apr 2026 20:24:23 +0100 Subject: [PATCH] add worker event tracking; implement worker rates display in admin panel --- admin.html | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/admin.html b/admin.html index fe5db7f..57b1964 100644 --- a/admin.html +++ b/admin.html @@ -1560,11 +1560,15 @@ function renderIntelGraph() { .attr('fill', d => SECTOR_COLOR[d.sector] || '#888') .attr('stroke', 'transparent') .attr('stroke-width', 2) - .on('mouseenter', function () { - d3.select(this).attr('stroke', 'rgba(255,255,255,0.85)'); + .on('mouseenter', function (ev, d) { + if (d.id !== graphSelectedId) { + d3.select(this).attr('stroke', 'rgba(255,255,255,0.6)'); + } }) - .on('mouseleave', function () { - d3.select(this).attr('stroke', 'transparent'); + .on('mouseleave', function (ev, d) { + if (d.id !== graphSelectedId) { + d3.select(this).attr('stroke', 'transparent'); + } }) .on('click', (ev, d) => { ev.stopPropagation(); @@ -1599,6 +1603,8 @@ function renderIntelGraph() { .force('link', d3.forceLink(edgesCopy).id(d => d.id).distance(80)) .force('charge', d3.forceManyBody().strength(-300)) .force('center', d3.forceCenter(width / 2, height / 2)) + .force('x', d3.forceX(width / 2).strength(0.07)) + .force('y', d3.forceY(height / 2).strength(0.07)) .force('collide', d3.forceCollide(d => graphNodeRadius(d) + 4)); sim.on('tick', () => { @@ -1665,6 +1671,10 @@ function applyGraphFilters() { .style('display', d => visibleIds.has(d.id) ? null : 'none') .style('opacity', d => (lit && !lit.has(d.id)) ? 0.15 : 1); + nodeSel.select('circle') + .attr('stroke', d => d.id === graphSelectedId ? '#ffffff' : 'transparent') + .attr('stroke-width', d => d.id === graphSelectedId ? 2.5 : 2); + linkSel .style('display', e => { if (filter !== 'all' && e.type !== filter) return 'none';