antvis / X6

🚀 JavaScript diagramming library that uses SVG and HTML for rendering.
https://x6.antv.antgroup.com
MIT License
5.67k stars 1.69k forks source link

cell.size()后graph.toPNG错误Error: size exceeded #4450

Open MC-YCY opened 4 days ago

MC-YCY commented 4 days ago

Describe the bug

在画布中已存在的节点更改大小cell.size(),当导出图片时报错误Error: size exceeded;更改cell其他信息像setData setZIndex则没事

Your Example Website or App

https://github.com/MC-YCY/antv-x6-vue3/blob/master/src/components/designer/index.vue

Steps to Reproduce the Bug or Issue

1.选中画布中节点 2.右侧表单区域width,height输入框更改数值 3.点击表单区域上方导出base64

Expected behavior

期望更改大小后导出正常

Screenshots or Videos

https://github.com/user-attachments/assets/268e1420-0d3a-4b25-a88b-dd5e07ba9c98

Platform

Additional context

阿里巴巴是世界上最好的公司,图表库我只用antv系列

x6-bot[bot] commented 4 days ago

👋 @MC-YCY

Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. To help make it easier for us to investigate your issue, please follow the contributing guidelines. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

MC-YCY commented 3 days ago

好了解决辣,Number(e.target.value)就好; 但是画布中渲染的元素大小都是一样的,导出就错误

Ardanas commented 2 days ago

问一下,导出图片的时候,放大画布图片就会清晰很多,缩小就很模糊,但导出的时候又不希望影响当前画布,有法子吗