Commit 641c56ec authored by Cloud's avatar Cloud

feat(SimResults): 增强图表交互功能

- 添加中键拖拽平移(按住滚轮拖动,带⇔视觉指示器)
- 添加滚轮缩放、左键框选放大
- 添加空格键智能裁剪(自动聚焦到数据变化区域)
- 添加工具栏:放大/缩小/撤销/重置/导出PNG
- 变量名自动翻译为中文标签(如 capacitor_1.p.v → 电容1 正极电压(V))
- 修复 React Hooks 顺序违规导致的白屏问题
- 使用 rAF 节流优化平移性能
parent 3a68f372
......@@ -141,6 +141,76 @@
font-family: 'Consolas', 'Monaco', monospace;
}
/* 工具栏 */
.toolbar {
display: flex;
align-items: center;
gap: 4px;
padding: 8px 24px;
border-bottom: 1px solid rgba(79, 138, 255, 0.08);
flex-shrink: 0;
background: #12121f;
}
.toolBtn {
display: flex;
align-items: center;
gap: 4px;
padding: 5px 10px;
border: 1px solid rgba(79, 138, 255, 0.15);
border-radius: 6px;
background: rgba(79, 138, 255, 0.05);
color: #ccc;
font-size: 11px;
cursor: pointer;
transition: all 0.15s;
white-space: nowrap;
}
.toolBtn:hover:not(:disabled) {
background: rgba(79, 138, 255, 0.15);
color: #4f8aff;
border-color: rgba(79, 138, 255, 0.4);
}
.toolBtn:disabled {
opacity: 0.35;
cursor: not-allowed;
}
.toolIcon {
font-size: 12px;
}
.toolLabel {
font-size: 11px;
}
.toolSep {
width: 1px;
height: 20px;
background: rgba(79, 138, 255, 0.15);
margin: 0 6px;
}
.zoomBadge {
padding: 3px 10px;
background: rgba(79, 138, 255, 0.1);
border: 1px solid rgba(79, 138, 255, 0.2);
border-radius: 20px;
color: #4f8aff;
font-size: 10px;
font-family: 'Consolas', 'Monaco', monospace;
white-space: nowrap;
}
.toolTip {
margin-left: auto;
font-size: 10px;
color: #555;
white-space: nowrap;
}
/* 内容区 */
.content {
flex: 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment