You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
and pass the render-root div to html2canvas.
The image is already loaded and displayed, but the canvas didn't contain the image sometimes. I tried one hundred, and nearly eighty are succeed, bu other twenty there is no image in canvas.
I investigated this. In canvas-renderer.ts, renderReplacedElement() function has the input check image && container.intrinsicWidth > 0 && container.intrinsicHeight > 0, sometimes container.intrinsicWidth and container.intrinsicHeight are 0.
Specifications:
html2canvas version tested with: 1.0.0-rc.7
Browser & version: Safari 13.1(iOS), 13.1.1(Mac)
Operating system: iOS/Mac
Note:
When I re-called html2canvas, then the phenomenon was disappeared. So, when container.intrinsicWidth === 0 || container.intrinsicHeight === 0 I hope to reject the result promise.
For this purpose, I'll create pull-request that add option for reject image loading error (contains width/height are zero).
The text was updated successfully, but these errors were encountered:
Bug reports:
Safari (iOS/Mac) fail to write image to canvas sometimes. The structure of html-element is following (simplified):
and pass the render-root div to html2canvas.
The image is already loaded and displayed, but the canvas didn't contain the image sometimes. I tried one hundred, and nearly eighty are succeed, bu other twenty there is no image in canvas.
I investigated this. In canvas-renderer.ts,
renderReplacedElement()
function has the input checkimage && container.intrinsicWidth > 0 && container.intrinsicHeight > 0
, sometimes container.intrinsicWidth and container.intrinsicHeight are 0.Specifications:
Note:
When I re-called html2canvas, then the phenomenon was disappeared. So, when
container.intrinsicWidth === 0 || container.intrinsicHeight === 0
I hope to reject the result promise.For this purpose, I'll create pull-request that add option for reject image loading error (contains width/height are zero).
The text was updated successfully, but these errors were encountered: