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

feat: Add margin around zoomToFit #6042

Merged
merged 3 commits into from
Apr 7, 2022
Merged

feat: Add margin around zoomToFit #6042

merged 3 commits into from
Apr 7, 2022

Conversation

NeilFraser
Copy link
Contributor

@NeilFraser NeilFraser commented Mar 29, 2022

Default to 20px.

@NeilFraser NeilFraser added the PR: feature Adds a feature label Mar 29, 2022
@NeilFraser NeilFraser requested a review from a team as a code owner March 29, 2022 12:45
/**
* Margin around the top/bottom/left/right after a zoomToFit call.
*/
this.zoomToFitMargin = 20;
Copy link
Collaborator

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.

Copy link
Contributor Author

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?

Copy link
Collaborator

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: feature Adds a feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants