Skip to content

Cannot change label of BraceText #4340

@henrikmidtiby

Description

@henrikmidtiby

Description of bug / unexpected behavior

The BraceText mobject has the method change_label, that I would expect to change the label of the brace.
However calling the method has no effect on the rendered scene.

How to reproduce the issue

To run the example below, first delete line 32 from brace.py that looks like

__all__ = ["Brace", "BraceBetweenPoints", "BraceLabel", "BraceText", "ArcBrace"]

Code for reproducing the problem

from manim import *

class BraceExample(Scene):
    def construct(self):
        s1 = Square().move_to(2*LEFT)
        self.add(s1)
        br1 = BraceText(s1, "Label")
        self.add(br1)

        s2 = Square().move_to(2*RIGHT)
        self.add(s2)
        br2 = BraceText(s2, "Label")

        # I would expect this line to change the label
        # of the br2 brace to "new". But this is not seen 
        # in the output.
        br2.change_label("new")
        self.add(br2)

Additional media files

Images/GIFs Image

Additional comments

This issue was discovered while working on #4309

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    🆕 New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions