-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
元素很多时 downloadFullImage 导出图片失败 #2980
Comments
数据量太大时导致 canvas API 调用内存不足。尝试先 fitView 再 download 呢 |
这个不行,但是我把画布缩小到一定比例不会报错了 |
graph.getCanvasBBox() 打印看下有多大? |
【最终发现了多种不同情况图片下载失败或异常】 情况一: 情况二: 情况三: 情况四: |
fitView 没有用的 |
…node shouldEnd does not stop the dragging node behavior, closes: #3173; fix: drag-combo fails to merge combo with enableDelegate, closes: #3137; fix: uncombo does not trigger afterremoveitem event, closes: #3179; fix: error label background position when the edge label has position start, closes: #3129; fix: destroyed graph judgement, closes: #3203; fix: edge click event will not be triggered when the contextmenu is configure with trigger click, closes: #3201; feat: drag-combo with shouldEnd, closes: #3202; chore: information for failing to download image, closes: #2980;
…node shouldEnd does not stop the dragging node behavior, closes: #3173; fix: drag-combo fails to merge combo with enableDelegate, closes: #3137; fix: uncombo does not trigger afterremoveitem event, closes: #3179; fix: error label background position when the edge label has position start, closes: #3129; fix: destroyed graph judgement, closes: #3203; fix: edge click event will not be triggered when the contextmenu is configure with trigger click, closes: #3201; feat: drag-combo with shouldEnd, closes: #3202; chore: information for failing to download image, closes: #2980;
…node shouldEnd does not stop the dragging node behavior, closes: #3173; fix: drag-combo fails to merge combo with enableDelegate, closes: #3137; fix: uncombo does not trigger afterremoveitem event, closes: #3179; fix: error label background position when the edge label has position start, closes: #3129; fix: destroyed graph judgement, closes: #3203; fix: edge click event will not be triggered when the contextmenu is configure with trigger click, closes: #3201; feat: drag-combo with shouldEnd, closes: #3202; chore: information for failing to download image, closes: #2980;
图片内容过多,导出的图片过大,都会导致导出的图片呈现空白的状态,这是因为在生成图片的时候,炸内存了,返回的base64 data 是空的,所以导致图片空白,建议切片导出,导出之后在拼接 |
1.如果是报错导致的下载失败,控制台会有以下信息:
Uncaught (in promise) RangeError: Failed to execute 'getImageData' on 'CanvasRenderingContext2D': Out of memory at ImageData creation
2.如果下载的图片无法打开,一般是因为 toDataURL 返回 的值 是
'data:,'
The text was updated successfully, but these errors were encountered: