Skip to content
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

adds , {backstoreOnly: true} for toDataURL export #4254

Merged
merged 1 commit into from Aug 29, 2017

Conversation

asturur
Copy link
Member

@asturur asturur commented Aug 28, 2017

close #4252

Makes the canvas resize do not resize also the css dimensions of the canvas.

adds the backstoreOnly to __toDataURLWithMultiplier's setDimensions calls to prevent the canvas from resizing in the browser window when the canvas.toDataURL() method is called per issue fabricjs#4252
@asturur
Copy link
Member Author

asturur commented Aug 28, 2017

@joemanfoo i started the PR from your branch.
If you want to finish it would be nice to do something like:

var needsResize = origWidth !== scaledWidth || origHeight !== scaledHeight

Then use needsResize to conditionally resize both the time or just not do it.

Also add a this.renderAll() after the second if ( newly added ) since the requestRenderAll created from setDimensions does not make really sense for an export.

@asturur asturur merged commit db6510b into fabricjs:master Aug 29, 2017
rkrueger11 pushed a commit to FlowMSP/fabric.js that referenced this pull request Sep 6, 2017
adds the backstoreOnly to __toDataURLWithMultiplier's setDimensions calls to prevent the canvas from resizing in the browser window when the canvas.toDataURL() method is called per issue fabricjs#4252
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fabricjs call to canvas.toDataURL() resizes the dimensions of the canvas
2 participants