Skip to content
Brian Marick edited this page Aug 31, 2017 · 2 revisions

Full source

I split the definition of Shape (now a sum type) into two parts:

type alias ShapeFunction msg =
  List (Svg.Attribute msg) -> List (Svg msg) -> Svg msg

type Shape msg =
  Shape (ShapeFunction msg)

Now a Shape can be created with Shape Svg.rect, as is done in Droplet.elm:

view : AnimationModel -> Svg msg
view =
  animatable (Shape S.rect) <| HasFixedPart
    [ ... ] 

I feel this new type adds nothing of value.