mirror of
https://github.com/3b1b/manim.git
synced 2025-04-13 09:47:07 +00:00
fix: fix some bugs caused by type hints and imports
This commit is contained in:
parent
e39f81ccff
commit
7fb6f352c4
2 changed files with 2 additions and 15 deletions
|
@ -1,18 +1,5 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from typing import Callable
|
||||
|
||||
from manimlib.mobject.mobject import Mobject
|
||||
from manimlib.event_handler.event_type import EventType
|
||||
|
||||
|
||||
class EventListner(object):
|
||||
def __init__(
|
||||
self,
|
||||
mobject: Mobject,
|
||||
event_type: EventType,
|
||||
event_callback: Callable[[Mobject, dict[str]]]
|
||||
):
|
||||
def __init__(self, mobject, event_type, event_callback):
|
||||
self.mobject = mobject
|
||||
self.event_type = event_type
|
||||
self.callback = event_callback
|
||||
|
|
|
@ -650,7 +650,7 @@ class Mobject(object):
|
|||
Otherwise, if about_point is given a value, scaling is done with
|
||||
respect to that point.
|
||||
"""
|
||||
if isinstance(scale_factor, npt.ArrayLike):
|
||||
if isinstance(scale_factor, Iterable):
|
||||
scale_factor = np.array(scale_factor).clip(min=min_scale_factor)
|
||||
else:
|
||||
scale_factor = max(scale_factor, min_scale_factor)
|
||||
|
|
Loading…
Add table
Reference in a new issue