Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to add <animate /> in <circle> ? #305

Closed
slegrand45 opened this issue Apr 11, 2022 · 1 comment · Fixed by #306
Closed

How to add <animate /> in <circle> ? #305

slegrand45 opened this issue Apr 11, 2022 · 1 comment · Fixed by #306
Assignees
Labels

Comments

@slegrand45
Copy link
Contributor

Hi,

I can't find a way to add the <animate /> tag in a <circle> one. It seems i have to use the animation function (animate seems undefined). But the animation function is not allowed in circle:

Error: This expression has type [> Svg_types.animation ] Svg.elt
       but an expression was expected of type
         [< Svg_types.circle_content ] Svg.elt
       Type [> Svg_types.animation ] = [> `Animation ]
       is not compatible with type
         [< Svg_types.circle_content ] =
           [< `Animate
            | `AnimateColor
            | `AnimateMotion
            | `AnimateTransform
            | `Desc
            | `Metadata
            | `Set
            | `Title ] 
       The second variant type does not allow tag(s) `Animation

Do i miss something ?
Thanks.

ilankri added a commit to ilankri/tyxml that referenced this issue Apr 12, 2022
@ilankri ilankri added the bug label Apr 12, 2022
@ilankri ilankri self-assigned this Apr 12, 2022
ilankri added a commit to ilankri/tyxml that referenced this issue Apr 12, 2022
@ilankri
Copy link
Member

ilankri commented Apr 12, 2022

Hello @slegrand45,

Do i miss something ?

No, it is just a bug :)

With these changes, the following code should be well-typed:

let circle = Tyxml.Svg.circle [Tyxml.Svg.animate []]

@Drup Drup closed this as completed in #306 Sep 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants