mirror of
https://github.com/mdgriffith/elm-ui.git
synced 2024-10-26 09:56:12 +03:00
Use Animatior.transition instead of keyframes
This commit is contained in:
parent
e8299d5fe6
commit
81c67b5ed4
@ -318,39 +318,18 @@ toAttr trigger incomingCss =
|
||||
|
||||
transitionWithTrigger : Trigger -> Duration -> List Animated -> Attribute msg
|
||||
transitionWithTrigger trigger dur attrs =
|
||||
Animator.css
|
||||
(Animator.Timeline.init []
|
||||
|> Animator.Timeline.to dur attrs
|
||||
|> Animator.Timeline.update (Time.millisToPosix 1)
|
||||
)
|
||||
(\animated ->
|
||||
( animated, [] )
|
||||
)
|
||||
Animator.transition dur attrs
|
||||
|> Animator.toCss
|
||||
|> toAttr trigger
|
||||
|
||||
|
||||
addPsuedoClass : String -> Animator.Css -> Animator.Css
|
||||
addPsuedoClass psuedo css =
|
||||
{ css
|
||||
| hash = css.hash ++ psuedo
|
||||
}
|
||||
|
||||
|
||||
{-| -}
|
||||
transition : Duration -> List Animated -> Attribute msg
|
||||
transition dur attrs =
|
||||
let
|
||||
css =
|
||||
Animator.css
|
||||
(Animator.Timeline.init []
|
||||
|> Animator.Timeline.to dur attrs
|
||||
|> Animator.Timeline.update (Time.millisToPosix 1)
|
||||
)
|
||||
(\animated ->
|
||||
( animated, [] )
|
||||
)
|
||||
in
|
||||
Two.styleList css.props
|
||||
Animator.transition dur attrs
|
||||
|> Animator.toCss
|
||||
|> .props
|
||||
|> Two.styleList
|
||||
|
||||
|
||||
{-| -}
|
||||
|
Loading…
Reference in New Issue
Block a user