mirror of
https://github.com/3b1b/manim.git
synced 2025-08-05 16:49:03 +00:00
Merge pull request #1704 from TurkeyBilly/patch-2
Adding "label_buff" config parameter for Brace
This commit is contained in:
commit
3ffe300f96
1 changed files with 3 additions and 1 deletions
|
@ -1,5 +1,6 @@
|
|||
import numpy as np
|
||||
import math
|
||||
import copy
|
||||
|
||||
from manimlib.animation.composition import AnimationGroup
|
||||
from manimlib.constants import *
|
||||
|
@ -88,6 +89,7 @@ class BraceLabel(VMobject):
|
|||
CONFIG = {
|
||||
"label_constructor": Tex,
|
||||
"label_scale": 1,
|
||||
"label_buff": DEFAULT_MOBJECT_TO_MOBJECT_BUFFER
|
||||
}
|
||||
|
||||
def __init__(self, obj, text, brace_direction=DOWN, **kwargs):
|
||||
|
@ -104,7 +106,7 @@ class BraceLabel(VMobject):
|
|||
if self.label_scale != 1:
|
||||
self.label.scale(self.label_scale)
|
||||
|
||||
self.brace.put_at_tip(self.label)
|
||||
self.brace.put_at_tip(self.label, buff=self.label_buff)
|
||||
self.set_submobjects([self.brace, self.label])
|
||||
|
||||
def creation_anim(self, label_anim=FadeIn, brace_anim=GrowFromCenter):
|
||||
|
|
Loading…
Add table
Reference in a new issue