Make neighbor projection save-deferred and Visio-style connect.

Project-neighbors supports dry_run for local dirty canvas; Save flushes adds. Connect mode uses drag-from side anchors with smoothstep elbows instead of click-click.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-08-05 23:11:13 +08:00
parent a746a84d01
commit b4f0e468cb
11 changed files with 229 additions and 76 deletions

View file

@ -7042,16 +7042,76 @@ pre {
.topo-node.is-connect-mode .topo-node__handle {
pointer-events: all;
opacity: 1 !important;
width: 12px !important;
height: 12px !important;
min-width: 12px !important;
min-height: 12px !important;
background: #f8fafc !important;
border: 2px solid #38bdf8 !important;
border-radius: 2px !important;
box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.35);
z-index: 5;
}
.topo-node__handle--center {
.topo-node.is-connect-mode .topo-node__handle:hover {
background: #38bdf8 !important;
border-color: #e0f2fe !important;
transform: scale(1.15);
}
.topo-node__handle--n {
left: 50% !important;
top: 0 !important;
right: auto !important;
bottom: auto !important;
transform: translate(-50%, -50%) !important;
}
.topo-node__handle--e {
left: auto !important;
top: 50% !important;
right: 0 !important;
bottom: auto !important;
transform: translate(50%, -50%) !important;
}
.topo-node__handle--s {
left: 50% !important;
top: auto !important;
right: auto !important;
bottom: 0 !important;
transform: translate(-50%, 50%) !important;
}
.topo-node__handle--w {
left: 0 !important;
top: 50% !important;
right: auto !important;
bottom: auto !important;
transform: translate(-50%, -50%) !important;
}
.topo-node.is-connect-mode .topo-node__handle--n:hover,
.topo-node.is-connect-mode .topo-node__handle--e:hover,
.topo-node.is-connect-mode .topo-node__handle--s:hover,
.topo-node.is-connect-mode .topo-node__handle--w:hover {
/* keep side translate while scaling */
}
.topo-node.is-connect-mode .topo-node__handle--n:hover {
transform: translate(-50%, -50%) scale(1.15) !important;
}
.topo-node.is-connect-mode .topo-node__handle--e:hover {
transform: translate(50%, -50%) scale(1.15) !important;
}
.topo-node.is-connect-mode .topo-node__handle--s:hover {
transform: translate(-50%, 50%) scale(1.15) !important;
}
.topo-node.is-connect-mode .topo-node__handle--w:hover {
transform: translate(-50%, -50%) scale(1.15) !important;
}
.topo-node.is-selected .topo-node__glyph {
outline: 2px solid #60a5fa;
outline-offset: 3px;