-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
feat: Add margin around zoomToFit #6042
Conversation
core/workspace_svg.js
Outdated
/** | ||
* Margin around the top/bottom/left/right after a zoomToFit call. | ||
*/ | ||
this.zoomToFitMargin = 20; |
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.
This can be a module-internal constant instead of being a property on WorkspaceSvg
.
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.
The purpose of this PR was to create a configurable margin.
Original message: https://groups.google.com/g/blockly/c/usQGbD3Ly3U
A constant would not be configurable by developers.
Are we thinking that the margin should be fixed?
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.
Yeah, I read it as a request for any margins (to make it look better) rather than configurable margins.
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.
Changed.
Default to 20px.