Fix a logistic bug (#1815)

This commit is contained in:
YishiMichael 2022-05-20 18:56:40 +08:00 committed by GitHub
parent 49723f54cb
commit cfded00f13
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -174,8 +174,8 @@ class StringMobject(SVGMobject, ABC):
):
l = self.full_span[1]
span = tuple(
default_index if index is None else
min(index, l) if index >= 0 else max(index + l, 0)
if index is not None else default_index
for index, default_index in zip(sel, self.full_span)
)
return [span]