mirror of
https://github.com/hansjone/netx.git
synced 2026-10-15 23:30:45 +08:00
Defer manual canvas edges to Save and restore center-anchor connect.
Keep connect/delete/move as dirty local edits until Save, use straight edges again, and drop Visio side handles so lines attach at the NE center like discovered links. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
b4f0e468cb
commit
155cb4e921
7 changed files with 180 additions and 140 deletions
|
|
@ -116,7 +116,7 @@ export function buildLinkDisplayEdges(
|
|||
const portLabel = formatPortPairLabel(data.source_port || "", data.target_port || "");
|
||||
out.push({
|
||||
...e,
|
||||
type: count > 1 ? "topoParallel" : e.type || "smoothstep",
|
||||
type: count > 1 ? "topoParallel" : e.type || "straight",
|
||||
// Never fall back to a stale e.label — it may still contain ports.
|
||||
label: hidePorts ? undefined : portLabel || undefined,
|
||||
data,
|
||||
|
|
@ -137,7 +137,7 @@ export function buildLinkDisplayEdges(
|
|||
const portLabel = formatPortPairLabel(data.source_port || "", data.target_port || "");
|
||||
out.push({
|
||||
...e,
|
||||
type: "smoothstep",
|
||||
type: "straight",
|
||||
label: hidePorts ? undefined : portLabel || undefined,
|
||||
data,
|
||||
});
|
||||
|
|
@ -162,7 +162,7 @@ export function buildLinkDisplayEdges(
|
|||
out.push({
|
||||
...primary,
|
||||
id: aggregateIdForPair(primary.source, primary.target),
|
||||
type: "smoothstep",
|
||||
type: "straight",
|
||||
label: formatBundleLabel(
|
||||
list.length,
|
||||
{ a_port: data.source_port, b_port: data.target_port },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue