fix: 图谱/思维导图高度塌陷导致不显示
真正根因: GraphView 容器有 flex:1(在行布局中)但不是 display:flex, 子组件 MindmapTree/LinkGraph 的 flex:1 被忽略 → 高度 auto = 0 (子内容全是绝对定位,无在流内容) → SVG 高度 0 → fit() 计算 NaN 持续报 translate(NaN,NaN) 错误,内容不可见 之前 E2E 只数 DOM 元素数量不检查可见性,掩盖了此 bug 修复: GraphView 容器加 display:flex + flexDirection:column, 子组件 flex:1 正常生效,容器高度正确,内容可见 附带: - 主进程转发渲染进程 console 到终端(便于 dev 调试) - graph-render E2E 测试改为检查可见性(getBoundingClientRect) - 修复 TabBar 关闭全部测试的 flaky 断言(expect.poll 自动重试)
This commit is contained in:
@@ -26,6 +26,11 @@ function createWindow() {
|
||||
}
|
||||
});
|
||||
win.on('ready-to-show', () => win?.show());
|
||||
// 转发渲染进程控制台消息到主进程终端(便于开发调试)
|
||||
win.webContents.on('console-message', (e, level, message, line, sourceId) => {
|
||||
const lv = ['log', 'info', 'warn', 'error'][level] || 'log';
|
||||
console.log('[renderer:' + lv + '] ' + message + (sourceId ? ' (' + sourceId + ':' + line + ')' : ''));
|
||||
});
|
||||
win.on('closed', () => { win = null; });
|
||||
// 窗口控制(FR-W2)
|
||||
ipcMain.on(IPC.winMinimize, () => win?.minimize());
|
||||
|
||||
Reference in New Issue
Block a user