antvis/G2

toDataURL 支持传入自定义 matrix #3594

Fiv5 posted onGitHub

  • I have searched the issues of this repository and believe that this is not a duplicate.

What problem does this feature solve?

有时候我们希望自己控制图片中主图的位置,比如当图中节点很多时,使用 ImageMinimap 代替 Minimap 以提高渲染性能。当主图发生了变更需要更新图片时,直接 toDataURL 拿到的是当前画布范围内的图片(为什么不用 toFullDataURL 的原因是图片会失真,不够清晰)。如果可以自己控制 matrix 的话我们可以在更新图片时传入graph.fitView() 时的最佳视角 matrix ,在更新完图片后再通过group.setMatrix 还原用户之前操作位置。

What does the proposed API look like?

imageMinimap 的传入配置增加 matrix

<!-- generated by antv-issue-helper. DO NOT REMOVE -->


G6 的 issue 嘛,可以去 G6 的仓库提交 issue。

posted by hustcc over 3 years ago

G6 的 issue 嘛,可以去 G6 的仓库提交 issue。

sorry,选错了

posted by Fiv5 over 3 years ago

Fund this Issue

$0.00
Funded

Pull requests