fix(graph): 真正对齐输出端口与选项行(flex 列避免外边距折叠)

上版只加 margin:5px 0 无效:普通块流里相邻端口外边距折叠,行距仍 20px。
改 .outputs 为 flex 纵向列(flex 项目外边距不折叠),端口行距才真正变 25px,
与 .ch-opt 选项行逐行对齐。
This commit is contained in:
2026-06-09 10:47:30 +08:00
parent 93a9ae96d6
commit 864688c0fc

View File

@ -114,8 +114,10 @@ button.mini { padding:2px 8px; font-size:12px; }
#drawflow .drawflow-node .input, #drawflow .drawflow-node .output {
background:#e6c878; border:2px solid #161310; width:15px; height:15px; }
#drawflow .drawflow-node .input:hover, #drawflow .drawflow-node .output:hover { background:#f0d68a; }
/* 输出端口纵向行距=选项行距:默认 15px 圆点+5px 下边距=20px 行距,与 .ch-opt 的 25px 错位(越往下越偏);
改 margin:5px 0 → 每端口格子 5+15+5=25px、圆点居中与各选项行逐行平齐任意选项数通用。 */
/* 输出端口纵向行距=选项行距:默认是普通块流,相邻端口 margin-bottom/margin-top 会“外边距折叠”→行距仍是 20px
与 .ch-opt 的 25px 错位(越往下越偏)。把 .outputs 改成 flex 纵向列flex 项目外边距不折叠),
再给每个端口 margin:5px 0 → 端口格子 5+15+5=25px、圆点居中与各选项行逐行平齐任意选项数通用。 */
#drawflow .drawflow-node .outputs { display:flex; flex-direction:column; }
#drawflow .drawflow-node .output { margin:5px 0; }
/* 连线 */
#drawflow .connection .main-path { stroke:#7a96c8; stroke-width:2.4px; }