MCPcopy Index your code
hub / github.com/ManimCommunity/manim / null_point_align

Method null_point_align

manim/mobject/mobject.py:2958–2972  ·  view source on GitHub ↗

If a :class:`~.Mobject` with points is being aligned to one without, treat both as groups, and push the one with points into its own submobjects list. Returns ------- :class:`Mobject` ``self``

(self, mobject: Mobject)

Source from the content-addressed store, hash-verified

2956 return self
2957
2958 def null_point_align(self, mobject: Mobject):
2959 """If a :class:`~.Mobject` with points is being aligned to
2960 one without, treat both as groups, and push
2961 the one with points into its own submobjects
2962 list.
2963
2964 Returns
2965 -------
2966 :class:`Mobject`
2967 ``self``
2968 """
2969 for m1, m2 in (self, mobject), (mobject, self):
2970 if m1.has_no_points() and m2.has_points():
2971 m2.push_self_into_submobjects()
2972 return self
2973
2974 def push_self_into_submobjects(self) -> Self:
2975 copy = self.copy()

Callers 1

align_dataMethod · 0.95

Calls 3

has_no_pointsMethod · 0.80
has_pointsMethod · 0.45

Tested by

no test coverage detected