This is just a work around for your question.
Found that the behavior of the set
as, when you give it wrong attribute values, it triggers the onbegin event and does nothing to the element.
So, using that, i have given wrong attribute values for the "to" attribute. So the set command triggers the begin event after 2s
, but no transformation is applied to the element.
Then, inside the onbegin event handler, i get the target element which in this case is rect with id c1
. Then i apply the required transformation to it.(rotate 110 about center.)
Also the onend is triggered after 5s
. Inside that, i test for the fill attribute value, and decide whether to revert the applied transformation.
This may be a work around but, there is no compromise in the begin value, duration value.
Also
<set attributeName="transform" to="200" ... />
translates in x dir with set behaviour
<set attributeName="transform" to="200 100" ... />
translates 200 in x dir and 100 in y dir with set behaviour
But cant find the syntax for rotate.
Placed a fiddle here http://jsfiddle.net/AA2tT/
<set attributeName="transform" to="rotate(110 100 100)" begin="1s" dur="1.7s"/>
I need to do the same thing but cannot figure it out. – Elysium