Skip to content

armgit / manim

Public Imported from GitHub
0

A community-maintained Python framework for creating mathematical animations.

Add buff parameter to BraceLabel (#1943)

sparshg5bac9e186d37
diff --git a/manim/mobject/svg/brace.py b/manim/mobject/svg/brace.py
index fa3003f07..1fcfdb686 100644
--- a/manim/mobject/svg/brace.py
+++ b/manim/mobject/svg/brace.py
@@ -140,6 +140,7 @@ class BraceLabel(VMobject, metaclass=ConvertToOpenGL):
brace_direction=DOWN,
label_constructor=MathTex,
label_scale=1,
+ buff=0.2,
**kwargs
):
self.label_constructor = label_constructor
@@ -147,9 +148,10 @@ class BraceLabel(VMobject, metaclass=ConvertToOpenGL):
super().__init__(**kwargs)
self.brace_direction = brace_direction
+ self.buff = buff
if isinstance(obj, list):
obj = self.get_group_class()(*obj)
- self.brace = Brace(obj, brace_direction, **kwargs)
+ self.brace = Brace(obj, brace_direction, buff, **kwargs)
if isinstance(text, tuple) or isinstance(text, list):
self.label = self.label_constructor(*text, **kwargs)