Re: animateTransform has no default value for 'type'

1) Basically we have Firefox with the correct implementation versus the
webkit with the wrong one.

2) OK, but <animateTransform> being a SMIL animation element (hosted by
SVG) is unique and cannot be re<use>d with different values.

On Wed, May 31, 2017 at 5:07 PM, Johannes Schoenke <
johannes.schoenke@gmail.com> wrote:

> 1) I’m sorry, Firefox was the one I didn’t test. It appears like the
> default value is not implemented in Chrome, Opera, and Safari (IE/Edge I
> have no idea and honestly don’t care). That’s sad.
>
> 2) That was not what I meant. Maybe I didn’t explain precisely enough.
> I'll give an example:
> I want this
>
> <path d='M1 1 1 2 2 2 2 1Z'>
>   <animateTransform attributeName='transform' type='translate' dur='7s'
> repeatCount='indefinite' values='0,0;1,0;1,1;0,1;0,0'/>
> </path>
> <path d='M2 2 2 3 3 3 3 2Z'>
>   <animateTransform attributeName='transform' type='translate' dur='7s'
> repeatCount='indefinite' values='0,0;-1,0;-1,-1;0,-1;0,0'/>
> </path>
>
> to be expressible as this
>
> <g>
>   <animateTransform attributeName='transform' type='translate' dur='7s'
> repeatCount='indefinite'/>
>
>   <path d='M1 1 1 2 2 2 2 1Z'>
>     <animateTransform values='0,0;1,0;1,1;0,1;0,0'/>
>   </path>
>   <path d='M2 2 2 3 3 3 3 2Z'>
>     <animateTransform values='0,0;-1,0;-1,-1;0,-1;0,0'/>
>   </path>
> </g>
>
> So all the animation attributes which are identical for both <paths> I
> just want to have to write once.
>
>
> Hannes
>
>
> On May 31, 2017, at 22:51, Domenico Strazzullo <
> strazzullo.domenico@gmail.com> wrote:
>
> 1) The 'type' attribute of 'animateTransform' does have the default value
> of 'translate', since the specification says so. Firefox implements
> correctly and executes a translation if 'type' is not specified (lines 9
> and 15 in the example below). Chrome doesn’t. You can report the bug with
> Chrome, but I'm not sure if they care any longer.
>
>
> 2) Animations for a group of different objects (including nested groups)
> ARE definable for the group:
>
>
> <g>
>
>   <set attributeName="visibility" to="hidden" begin="20s"/>
>
>   <animateTransform attributeName="transform" type="skewX" from="90"
> to="0" begin="0s" dur="5s"/>
>
>   <g>
>
>   <animateTransform attributeName="transform" type="skewY" from="-45"
> to="0" begin="0s" dur="5s"/>
>
>   <g id="tubes">
>
> <animateTransform attributeName="transform" type="scale" from="0" to="1"
> begin="0s" dur="5s" fill="freeze"/>
>
>   <g id="hor1">
>
> <animateTransform attributeName="transform" from="150 750" to="150 150"
> begin="0s" dur="5s" fill="freeze"/>
>
> <use xlink:href="#left_cap"/>
>
> <use xlink:href="#right_cap" transform="translate(360 0)"/>
>
> <use id="t1" transform="scale(3.6 1)" xlink:href="#h_tube"/>
>
> </g>
>
> <g id="vert1">
>
> <animateTransform attributeName="transform" from="74 574" to="474 174"
> begin="0s" dur="5s" fill="freeze"/>
>
> <use xlink:href="#top_cap"/>
>
> <use xlink:href="#bottom_cap" transform="translate(0 125)"/>
>
> <use transform="scale(1 1.25)" xlink:href="#v_tube"/>
>
> </g>
>
>         ...
>
> </g>
>
>
> It is wise before making a suggestion literally, to ask or double-check,
> because if nobody replies then other readers might see it as a valid
> suggestion. Some changes to the spec in the past were introduced out of
> confusional debating where there was no need, without proper auditing.
>
>
>
> Domenico Strazzullo
>
>
>
> On Mon, May 29, 2017 at 4:17 PM, Johannes Schoenke <
> johannes.schoenke@gmail.com> wrote:
>
>> I could not find anything about this in the mailing list, so I thought a
>> share.
>>
>> In the SVG 1.1 standard section 19.2.16, right at the beginning of
>> ‘Attribute definitions’ it says about the ‘type’ attribute:
>>
>> ‘… . If the attribute [type] is not specified, then the effect is as if a
>> value of 'translate' were specified.’
>>
>> This is not true.
>> If ‘type’ is not specified, nothing gets animated.
>> So it seems like ‘type’ has no default value.
>>
>> Hope this helps.
>>
>> Best wishes,
>> Hannes
>>
>>
>> P.S.: Suggestion for the next standard:
>> For ‘animateTransform’ and all related animation tags attributes like for
>> example
>>
>> attributeName='transform' type='translate' fill='freeze' dur=‘4s’ …
>>
>> Should be definable for a group of different objects/animations. At the
>> moment one has to write them for every single animation tag. Many animated
>> SVG files would probably be half the size with this feature!
>>
>> <https://www.w3.org/TR/SVG/Overview.html>
>>
>
>
>

Received on Wednesday, 31 May 2017 16:58:31 UTC