I'm trying to develop some SVGs with animation embedded into the SVG. I've got the animations running, but I can't seem to use the fill
attribute for SVG animations. In fact setting the attribute in the designer does not translate to an HTML fill
attribute when I inspect the element.
Here is my Embedded SVG in the designer
[
{
"type": "circle",
"fill": "blue",
"elements": [
{
"type": "animateMotion",
"fill": "freeze",
"begin": "0s",
"dur": "10s",
"path": "M45,0 L68,30 C50,50,55,50,70,75 L67,78 C50,70,40,80,53,97 L50,100 C30,75,30,60,57,68 L35,40 Q60,25,38,0 Z",
"repeatCount": 1
}
],
"r": 1,
"id": "freezeCircle"
}
]
My blue circle has animateTransform
and the fill
set to freeze
. The animation runs a single time and resets to coords 0,0. When I inspect the HTML of this blue circle it does not have the fill
attribute. Here is the HTML:
<circle id="C-0-1-freezeCircle" r="1" style="fill: blue;">
<animateMotion begin="0s" dur="10s" path="M45,0 L68,30 C50,50,55,50,70,75 L67,78 C50,70,40,80,53,97 L50,100 C30,75,30,60,57,68 L35,40 Q60,25,38,0 Z" repeatCount="1"></animateMotion>
</circle>
Can I not expect to be able to use the fill
attribute in SVG animations, or any work around?