added condition for OpenGLVMobject (#3211)

This commit is contained in:
JinchuLi2002 2023-04-25 07:42:47 -04:00 committed by GitHub
commit 4059bc1102
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,6 +2,8 @@
from __future__ import annotations
from manim.mobject.opengl.opengl_vectorized_mobject import OpenGLVMobject
__all__ = ["NumberLine", "UnitInterval"]
@ -626,7 +628,7 @@ class NumberLine(Line):
"""
if label_constructor is None:
label_constructor = self.label_constructor
if isinstance(label_tex, VMobject):
if isinstance(label_tex, (VMobject, OpenGLVMobject)):
return label_tex
else:
return label_constructor(label_tex, **kwargs)