instead of {style = Animation.style [ Animation.left (px 0.0) ]} I want to break but styles into helper functions. I need to do this in order to dynamically style each element so I set up a function like this:
layoutStyles : ElementId -> Animation a
layoutStyles id =
Animation.style [ Animation.left (0 * id |> px) ]
initModel id =
{style = layoutStyles id}
but I get the following error:
Cannot find type `Animation`
25| layoutStyles : Maybe Int -> Animation a
^^^^^^^^^
And when I try Animation.State I get a type mismatch. Because Elm infers that it's looking for Animation.Model.Animation a and I have no way of getting to that type as far as I know.
Animation a is an internal type . Your type signature should be ElementId -> Animation.State or ElementId -> Animation.Messenger.State Msg if you're using the messaging feature.
instead of
{style = Animation.style [ Animation.left (px 0.0) ]}
I want to break but styles into helper functions. I need to do this in order to dynamically style each element so I set up a function like this:but I get the following error:
And when I try
Animation.State
I get a type mismatch. Because Elm infers that it's looking forAnimation.Model.Animation a
and I have no way of getting to that type as far as I know.