Keep edge labels annotation sized
This commit is contained in:
parent
d2627f2668
commit
fab7e2f06d
1 changed files with 3 additions and 9 deletions
|
|
@ -616,17 +616,11 @@ export function EpiphanyGraphViewer({
|
|||
strokeLinejoin="round"
|
||||
vectorEffect="non-scaling-stroke"
|
||||
/>
|
||||
{!expandedNodeMatches &&
|
||||
(isSelected || isConnected || (!compactGraph && activeTransform.scale > 1.75)) &&
|
||||
edge.label?.trim() && (
|
||||
{isSelected && edge.label?.trim() && (
|
||||
<g
|
||||
transform={`translate(${edge.midpoint.x} ${edge.midpoint.y})`}
|
||||
transform={`translate(${edge.midpoint.x} ${edge.midpoint.y}) scale(${1 / Math.max(0.001, activeTransform.scale)})`}
|
||||
pointerEvents="none"
|
||||
opacity={
|
||||
isSelected || isConnected
|
||||
? 1
|
||||
: fadeBetween(activeTransform.scale, 1.75, 2.05)
|
||||
}
|
||||
opacity={0.95}
|
||||
>
|
||||
<rect
|
||||
x={-44}
|
||||
|
|
|
|||
Loading…
Reference in a new issue