Fix a logistic bug

This commit is contained in:
YishiMichael 2022-05-20 18:49:38 +08:00
parent 49723f54cb
commit 26de7c9ce5
No known key found for this signature in database
GPG key ID: EC615C0C5A86BC80

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]