We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
画布放大后,自定义节点会模糊
No response
Please select / 请选择
The text was updated successfully, but these errors were encountered:
您提到在放大画布后,自定义节点会变得模糊。这个问题可能与节点的渲染方式有关。在 G6 中,节点通常是通过 HTML、SVG 或 Canvas 来渲染的。放大时,Canvas 渲染的内容可能会因为分辨率不足而显得模糊。
以下是一些可能的解决方案:
使用矢量图形:如果您当前使用的是 Canvas 渲染,尝试使用 SVG 渲染,因为 SVG 是基于矢量的,放大后不会失真。
调整分辨率:如果必须使用 Canvas,可以尝试在初始化画布时设置更高的分辨率。
自定义节点的缩放:确保自定义节点在放大时能够正确缩放。可以通过监听画布的缩放事件,动态调整节点的样式。
如果这些建议没有解决您的问题,您可以提供更多的代码细节或复现链接,以便我能更好地帮助您。
Sorry, something went wrong.
I have the same problem, custom node rendered by html
这是因为 HTML(包括 React)节点在缩放过程中是通过 transform 实现的,这并非 Bug,而是实现逻辑导致的。你可以尝试将节点尺寸设置为一个较大的值。
transform
No branches or pull requests
Describe the bug / 问题描述
画布放大后,自定义节点会模糊
Reproduction link / 复现链接
No response
Steps to Reproduce the Bug or Issue / 重现步骤
No response
G6 Version / G6 版本
Please select / 请选择
OS / 操作系统
Browser / 浏览器
The text was updated successfully, but these errors were encountered: