-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Scale and center SVG in the editor #14178
Conversation
Hi, @kevintab95, this pull request does not have a "CHANGELOG: ..." label as mentioned in the PR pointers. Assigning @kevintab95 to add the required label. PRs without this label will not be merged. If you are unsure of which label to add, please ask the reviewers for guidance. Thanks! |
Hi @vojtechjelinek @iamprayush could you please prioritise this? We're trying to hotfix this PR. Thanks! |
let dimensions = this.value && ( | ||
this.imagePreloaderService.getDimensionsOfImage(this.value)); | ||
this.canvas.setHeight(dimensions?.height || this.CANVAS_HEIGHT); | ||
this.canvas.setWidth(dimensions?.width || this.CANVAS_WIDTH); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a bit confused by this code, but I think it can be addressed in subsequent PR.
I think that we should have an explanatory comment here. Also I'm unsure what let dimensions = this.value && this.imagePreloaderService.getDimensionsOfImage(this.value);
does?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One comment that should be addressed in a different PR.
Overview
Essential Checklist
Proof that changes are correct
svg-edit-resize.mp4
PR Pointers