Stretch to fit should apply to all 3 dimensions

This commit is contained in:
Grant Sanderson
2020-06-13 15:21:47 -07:00
parent 81cedfbfda
commit 46bcf938ed

View File

@ -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),