mirror of
https://github.com/hansjone/netx.git
synced 2026-10-14 10:36:00 +08:00
Stop auto-creating maps on new regions; keep aggregate edges single-width by default.
This commit is contained in:
parent
4abb037dce
commit
af29977878
10 changed files with 58 additions and 40 deletions
|
|
@ -89,6 +89,7 @@ export function buildLinkDisplayEdges(
|
|||
edges: Edge[],
|
||||
expandPhysical: boolean,
|
||||
hidePorts = false,
|
||||
scaleBundleWidth = false,
|
||||
): Edge[] {
|
||||
const groups = new Map<string, Edge[]>();
|
||||
for (const e of edges) {
|
||||
|
|
@ -153,9 +154,11 @@ export function buildLinkDisplayEdges(
|
|||
aggregated: true,
|
||||
member_count: list.length,
|
||||
members,
|
||||
// Slightly thicker logical bundle.
|
||||
stroke_width: Math.max(Number(prev.stroke_width || 0), Math.min(8, 2 + list.length)),
|
||||
};
|
||||
// Optional: thicken logical bundles by member count (default keeps single-line width).
|
||||
if (scaleBundleWidth) {
|
||||
data.stroke_width = Math.max(Number(prev.stroke_width || 0), Math.min(8, 2 + list.length));
|
||||
}
|
||||
out.push({
|
||||
...primary,
|
||||
id: aggregateIdForPair(primary.source, primary.target),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue