mirror of
https://github.com/ManimCommunity/manim.git
synced 2026-06-22 10:01:47 +00:00
using color instead of fill_color with MathTeX for node labels (#4501)
* fill_color --> color for MathTeX * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
This commit is contained in:
parent
2317b0ee8b
commit
eca7f17853
1 changed files with 2 additions and 4 deletions
|
|
@ -588,9 +588,7 @@ class GenericGraph(VMobject, metaclass=ConvertToOpenGL):
|
|||
self._labels = labels
|
||||
elif isinstance(labels, bool):
|
||||
if labels:
|
||||
self._labels = {
|
||||
v: MathTex(v, fill_color=label_fill_color) for v in vertices
|
||||
}
|
||||
self._labels = {v: MathTex(v, color=label_fill_color) for v in vertices}
|
||||
else:
|
||||
self._labels = {}
|
||||
|
||||
|
|
@ -697,7 +695,7 @@ class GenericGraph(VMobject, metaclass=ConvertToOpenGL):
|
|||
)
|
||||
|
||||
if label is True:
|
||||
label = MathTex(vertex, fill_color=label_fill_color)
|
||||
label = MathTex(vertex, color=label_fill_color)
|
||||
elif vertex in self._labels:
|
||||
label = self._labels[vertex]
|
||||
elif not isinstance(label, (Mobject, OpenGLMobject)):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue