Skip to content

Commit 79eb198

Browse files
authored
GrowArrow animation fixed, (fixes #1002) (#1003)
1 parent f563c8f commit 79eb198

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

manim/animation/growing.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,13 @@ def __init__(self, arrow: "Arrow", **kwargs) -> None:
5757
point = arrow.get_start()
5858
super().__init__(arrow, point, **kwargs)
5959

60+
def create_starting_mobject(self) -> "Mobject":
61+
start_arrow = self.mobject.copy()
62+
start_arrow.scale(0, scale_tips=True, about_point=self.point)
63+
if self.point_color:
64+
start_arrow.set_color(self.point_color)
65+
return start_arrow
66+
6067

6168
class SpinInFromNothing(GrowFromCenter):
6269
def __init__(self, mobject: "Mobject", path_arc: float = PI, **kwargs) -> None:

manim/mobject/geometry.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -856,6 +856,7 @@ def scale(self, factor, scale_tips=False, **kwargs):
856856

857857
if scale_tips:
858858
VMobject.scale(self, factor, **kwargs)
859+
self.set_stroke_width_from_length()
859860
return self
860861

861862
has_tip = self.has_tip()

0 commit comments

Comments
 (0)