Skip to content

fix: restore axis grid after visibility update#4624

Merged
xuefei1313 merged 1 commit into
developfrom
fix/restore-axis-grid-after-update
Jul 15, 2026
Merged

fix: restore axis grid after visibility update#4624
xuefei1313 merged 1 commit into
developfrom
fix/restore-axis-grid-after-update

Conversation

@xuefei1313

Copy link
Copy Markdown
Contributor

🤔 This is a ...

  • New feature
  • Bug fix
  • TypeScript definition update
  • Performance optimization
  • Test Case

💡 Background and solution

在关闭动画时,通过 updateSpec 将坐标轴网格的 visibletrue 切换为 false 再恢复为 true,已有的 VRender grid component 可能已经从 product 上脱离。此前 ComponentMark 复用已有 component 时只更新 attributes,没有重新挂载,导致网格线无法恢复显示。

本修复在复用 component 时检查其 parent;仅当它已脱离当前 product 时重新 appendChild。同时增加左右坐标轴网格显隐切换的回归测试。公共 API 不变,正常已挂载路径不会增加额外生命周期操作。

📝 Changelog

Language Changelog
🇺🇸 English Restore existing axis grid graphics when visibility is enabled again through updateSpec with animation disabled.
🇨🇳 Chinese 修复关闭动画时通过 updateSpec 隐藏并重新显示坐标轴网格后,已有网格图元未恢复的问题。

☑️ Self-Check before Merge

  • Doc is not needed
  • Demo is not needed
  • TypeScript definition update is not needed
  • Changelog is provided

✅ Validation

  • rushx test --runInBand __tests__/unit/core/update-effects.test.ts: 108/108 tests passed
  • rushx compile: passed
  • Pre-push rush test --only tag:package: VChart 74 suites / 382 tests passed; VUtils Extension 1/1 test passed
  • ESLint on changed TypeScript files: 0 errors

@xuefei1313 xuefei1313 marked this pull request as ready for review July 15, 2026 05:21
@xuefei1313 xuefei1313 merged commit 79bcd08 into develop Jul 15, 2026
7 of 10 checks passed
@xuefei1313 xuefei1313 deleted the fix/restore-axis-grid-after-update branch July 15, 2026 06:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants