-
Notifications
You must be signed in to change notification settings - Fork 570
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Large Dom sizes failing to be drawn correctly into canvas when e…
…xporting to PNG (#197) When context.drawImage is called within the toCanvas method, we are able to go over the maximum limits of the browser inbuilt canvas object. When this happens draw commands within context.drawImage are ignored resulting in missing parts of the image. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/canvas#maximum_canvas_size for details. This adds a checkCanvasDimensions function to ensure that the image is appropriately scaled before being drawn and a susbsequent options.skipAutoScale if a library user wishes to turn this default functionality off. Co-authored-by: Darren Impey <dh118592@dunnhumby.com>
- Loading branch information
Showing
3 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters