Skip to content

初始化画布设置panning: { enabled: true },添加元素将元素拖动到可是区域外,toSVG导出的图片就不完整了 #3340

Answered by NewByVector
scootDai asked this question in Q&A
Discussion options

You must be logged in to vote

可以通过设置 viewBox 属性解决。

const rect = this.graph.getContentArea().inflate(24)
this.exportInstance.exportSVG('scroller', {
  viewBox: rect
})

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@huaguanjun
Comment options

@NewByVector
Comment options

Answer selected by NewByVector
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants