various fixes and cleanup
mainly involving ports_to_data and data_to_ports
This commit is contained in:
parent
16567c8a66
commit
963918d1d9
13 changed files with 62 additions and 54 deletions
|
|
@ -1,4 +1,4 @@
|
|||
from typing import TypeVar, cast
|
||||
from typing import TypeVar, cast, Any
|
||||
from abc import ABCMeta, abstractmethod
|
||||
|
||||
import numpy
|
||||
|
|
@ -114,6 +114,9 @@ class PivotableImpl(Pivotable, metaclass=ABCMeta):
|
|||
"""
|
||||
__slots__ = ()
|
||||
|
||||
offset: Any # TODO see if we can get around defining `offset` in PivotableImpl
|
||||
""" `[x_offset, y_offset]` """
|
||||
|
||||
def rotate_around(self: J, pivot: ArrayLike, rotation: float) -> J:
|
||||
pivot = numpy.array(pivot, dtype=float)
|
||||
cast(Positionable, self).translate(-pivot)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue