elm-community / typed-svg

Typed SVG library written for Elm
BSD 3-Clause "New" or "Revised" License
59 stars 16 forks source link

The type Additive have incorrect variants. #27

Closed RalfNorthman closed 6 years ago

RalfNorthman commented 6 years ago

The type Additive have the variants AdditiveNone | AdditiveReplace, but should have AdditiveReplace | AdditiveSum (with correction to the corresponding function in TypesToStrings.elm).

Source: https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/additive

Comes up when combining transform animations in this way:

<rect x="10" y="10" width="40" height="20"
      style="stroke: #000000; fill: none;">
    <animateTransform attributeName="transform" attributeType="XML"
                      type="scale"
                      from="1" to="3"
                      begin="0s" dur="10s"
                      repeatCount="indefinite"
                      additive="sum"
            />
    <animateTransform attributeName="transform" attributeType="XML"
                      type="rotate"
                      from="0 30 20" to="360 30 20"
                      begin="0s" dur="10s"
                      fill="freeze"
                      repeatCount="indefinite"
                      additive="sum"
            />

(http://tutorials.jenkov.com/svg/svg-animation.html)

RalfNorthman commented 6 years ago

I think I can fix this during the weekend.