mirror of
https://github.com/3b1b/manim.git
synced 2025-07-29 21:12:35 +08:00
Stretch to fit should apply to all 3 dimensions
This commit is contained in:
@ -618,8 +618,8 @@ class Mobject(Container):
|
|||||||
raise Warning("Attempting to replace mobject with no points")
|
raise Warning("Attempting to replace mobject with no points")
|
||||||
return self
|
return self
|
||||||
if stretch:
|
if stretch:
|
||||||
self.stretch_to_fit_width(mobject.get_width())
|
for i in range(self.dim):
|
||||||
self.stretch_to_fit_height(mobject.get_height())
|
self.rescale_to_fit(mobject.length_over_dim(i), i, stretch=True)
|
||||||
else:
|
else:
|
||||||
self.rescale_to_fit(
|
self.rescale_to_fit(
|
||||||
mobject.length_over_dim(dim_to_match),
|
mobject.length_over_dim(dim_to_match),
|
||||||
|
Reference in New Issue
Block a user