mirror of
https://github.com/hansjone/netx.git
synced 2026-10-18 07:40:50 +08:00
Hide white React Flow edge-label backgrounds on the topology canvas.
Disable labelShowBg for straight edges and suppress the default SVG textbg so link numbers render as text only. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
83acb5eef1
commit
4a0918ab44
2 changed files with 17 additions and 9 deletions
|
|
@ -597,7 +597,8 @@ function resolveEdgeStyle(
|
|||
function withEdgeVisual(edge: Edge, defaults: EdgeDefaults): Edge {
|
||||
const data = (edge.data || {}) as EdgeStyleData;
|
||||
const style = resolveEdgeStyle(data, defaults);
|
||||
return { ...edge, style, markerEnd: undefined };
|
||||
// RF EdgeText defaults labelShowBg=true with a white rect — keep digits only.
|
||||
return { ...edge, style, markerEnd: undefined, labelShowBg: false };
|
||||
}
|
||||
|
||||
function graphToFlow(
|
||||
|
|
@ -3385,7 +3386,7 @@ export function TopologyPage() {
|
|||
edgeTypes={edgeTypes}
|
||||
onlyRenderVisibleElements
|
||||
connectionMode={ConnectionMode.Loose}
|
||||
defaultEdgeOptions={{ type: "straight" }}
|
||||
defaultEdgeOptions={{ type: "straight", labelShowBg: false }}
|
||||
proOptions={{ hideAttribution: true }}
|
||||
minZoom={0.05}
|
||||
maxZoom={4}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue