You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The fact that 'align' and friends currently require a Boundable constraint is an implementation detail. Things that are Boundable can certainly be aligned using the current code. However, there are other things which are not Boundable but which it makes sense to align: the particular motivating example being animations.
Just as was already done with the new Juxtaposable class, aligning ought to be done in terms of a new class, something like
class Alignable a where
alignBy :: V a -> Scalar (V a) -> a -> a
with a function 'alignByDefault' provided which gives the current implementation in terms of Boundable etc. Then we can also make an Alignable instance for animations, which simply does the alignment pointwise over time.
The text was updated successfully, but these errors were encountered:
(Imported from http://code.google.com/p/diagrams/issues/detail?id=64. Original issue from byor...@gmail.com on January 22, 2012, 06:22:36 PM UTC)
The fact that 'align' and friends currently require a Boundable constraint is an implementation detail. Things that are Boundable can certainly be aligned using the current code. However, there are other things which are not Boundable but which it makes sense to align: the particular motivating example being animations.
Just as was already done with the new Juxtaposable class, aligning ought to be done in terms of a new class, something like
class Alignable a where
alignBy :: V a -> Scalar (V a) -> a -> a
with a function 'alignByDefault' provided which gives the current implementation in terms of Boundable etc. Then we can also make an Alignable instance for animations, which simply does the alignment pointwise over time.
The text was updated successfully, but these errors were encountered: