Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: unexpected element clear #6710

Merged
merged 2 commits into from
Jan 9, 2025
Merged

fix: unexpected element clear #6710

merged 2 commits into from
Jan 9, 2025

Conversation

Aarebecca
Copy link
Contributor

  • 修复 element.clear 清理不彻底的问题

  • Fixed the issue that element.clear was not cleaned thoroughly

@Aarebecca Aarebecca added the publish PR merges with this tag will perform the publication label Jan 9, 2025
Copy link

Walkthrough: This pull request addresses an issue where the element.clear method was not thoroughly cleaning elements. The changes ensure that the container is properly destroyed and re-initialized, thus resolving the incomplete cleanup problem.

Changes:

Files Summary
packages/g6-extension-3d/package.json, packages/g6-extension-react/package.json, packages/g6-ssr/package.json, packages/g6/package.json Updated package version numbers.
packages/g6/tests/bugs/graph-draw-after-clear.spec.ts Added a snapshot test to verify the graph is blank after clearing.
packages/g6/tests/snapshots/bugs/graph-draw-after-clear/blank.svg Added new snapshot for blank state verification.
packages/g6/tests/snapshots/bugs/graph-draw-after-clear/default.svg Removed old snapshot data.
packages/g6/src/runtime/element.ts Modified the clear method to destroy and reinitialize the container. Added initContainer method for container management.
packages/g6/src/version.ts Updated version number from 5.0.41 to 5.0.42.
🪧 Tips For further assistance, please describe your question in the comments and @petercat-assistant to start a conversation with me.

@Aarebecca Aarebecca merged commit e22f7b7 into v5 Jan 9, 2025
2 checks passed
@Aarebecca Aarebecca deleted the fix/element-clear branch January 9, 2025 03:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
publish PR merges with this tag will perform the publication
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant