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

refactor: use unified util to create plugin canvas #6524

Merged
merged 6 commits into from
Nov 15, 2024
Merged

Conversation

Aarebecca
Copy link
Contributor

  • 提供统一的 createPluginCanvas 工具函数为插件创建独立画布
  • 图例插件绘制于独立画布中,不受相机缩放、移动影响

由于绘制到其他画布,因此截图中无法显示出来。
后续考虑提供特殊 hook,在截图、导出图片时从插件读取额外元素

Nov-15-2024 15-27-51


  • Provide a unified 'createPluginCanvas' utility function to create a standalone canvas for the plugin
  • The legend plugin is drawn in a standalone canvas and is not affected by camera zoom or movement

Cannot be shown in screenshots because they are drawn to a different canvas.
Consider providing a special hook to read additional elements from the plugin when taking screenshots and exporting images

packages/g6/src/plugins/legend.ts Outdated Show resolved Hide resolved
@Aarebecca Aarebecca merged commit ebeab13 into v5 Nov 15, 2024
3 checks passed
@Aarebecca Aarebecca deleted the refactor/plugins branch November 15, 2024 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants