feat(network-map): refine stale node representation with updated dimensions and positioning for improved clarity
Publish Fast Tabler Docker image / build-and-push-fast (push) Successful in 2m15s

This commit is contained in:
2026-02-25 02:01:24 +07:00
parent d43a77e368
commit e1b5bb4c97
+9 -7
View File
@@ -677,12 +677,14 @@ export default function NetworkMapUnifi({
const isStale = e.stale === true;
const staleColor = UNIFI_WARNING;
const textWidth = labelText.length * (compactOnly ? 5.9 : 6.2);
const iconWidth = isStale ? 14 : 0;
const staleDotRadius = 4.2;
const staleDotSpace = isStale ? 18 : 0;
const minW = compactOnly ? 76 : LABEL_W;
const maxW = compactOnly ? 160 : 210;
const w = Math.max(minW, Math.min(textWidth + pad * 2 + iconWidth, maxW));
const h = LABEL_H;
const textX = x - (iconWidth / 2);
const w = Math.max(minW, Math.min(textWidth + pad * 2 + staleDotSpace, maxW));
const h = isStale ? LABEL_H + 2 : LABEL_H;
const textAnchor = isStale ? 'start' : 'middle';
const textX = isStale ? (x - w / 2 + pad + staleDotSpace) : x;
return (
<g>
<rect
@@ -698,9 +700,9 @@ export default function NetworkMapUnifi({
/>
{isStale && (
<circle
cx={x - w / 2 + 10}
cx={x - w / 2 + pad + staleDotRadius}
cy={y}
r={4.4}
r={staleDotRadius}
fill={staleColor}
opacity={0.95}
/>
@@ -708,7 +710,7 @@ export default function NetworkMapUnifi({
<text
x={textX}
y={y}
textAnchor="middle"
textAnchor={textAnchor}
dominantBaseline="middle"
fill={isStale ? staleColor : edgeColor}
fontSize={compactOnly ? 10.2 : 11}