feat: 优化波形渲染性能与交互
All checks were successful
Package component / package (push) Successful in 5m56s

This commit is contained in:
李启源
2026-07-22 16:36:48 +08:00
parent 356f55c9fd
commit 5b0ba7413e
35 changed files with 8208 additions and 246 deletions

View File

@@ -39,6 +39,31 @@ describe('waveform grid helpers', () => {
})
})
it('preserves optional per-direction grid colors and ignores blank values', () => {
expect(
normalizeGridOptions({
trackLines: {
voltage: {
horizontalColor: '#ef4444',
verticalColor: ' #2563eb ',
},
current: { horizontalColor: ' ' },
},
}).trackLines,
).toEqual({
voltage: {
horizontal: true,
vertical: true,
horizontalColor: '#ef4444',
verticalColor: ' #2563eb ',
},
current: {
horizontal: true,
vertical: true,
},
})
})
it('falls back to visible grid lines for invalid runtime values', () => {
const options = {
trackLines: {