-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Fix wrong value of MObject width/height with empty VGroup #4088
base: main
Are you sure you want to change the base?
Conversation
@@ -136,21 +136,19 @@ def test_mobject_dimensions_nested_mobjects(): | |||
|
|||
|
|||
def test_mobject_dimensions_mobjects_with_no_points_are_at_origin(): |
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.
As the previous test was testing an unexpected behavior, it should have been linked to an issue.
@@ -2149,10 +2153,11 @@ def get_nadir(self) -> Point3D: | |||
|
|||
def length_over_dim(self, dim: int) -> float: |
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.
As this function is meant to be used only internally, it should be private
def length_over_dim(self, dim: int) -> float: | |
def __length_over_dim(self, dim: int) -> float: |
or at least protected
def length_over_dim(self, dim: int) -> float: | |
def _length_over_dim(self, dim: int) -> float: |
Overview: What does this pull request change?
Fix the issue 4087.
When an MObject contains an empty VGroup, its width or height can be wrong
Motivation and Explanation: Why and how do your changes improve the library?
Bug fix + tests
Links to added or changed documentation pages
No documentation page, bug fix only.
Further Information and Comments
Reviewer Checklist