Loading ...
Sorry, an error occurred while loading the content.

SVG animateTransform does not start

Expand Messages
  • wenxin1308
    I was writing a piece of SVG code and ran into the following issue: The animateTransform tag won t work (cannot start the animation) if the SVG isn t appended
    Message 1 of 2 , Oct 22, 2012
    • 0 Attachment
      I was writing a piece of SVG code and ran into the following issue:

      The animateTransform tag won't work (cannot start the animation) if the
      SVG isn't appended to the document with the window onload event.

      Example: http://jsfiddle.net/r4WEh/ <http://jsfiddle.net/r4WEh/> vs
      http://jsfiddle.net/r4WEh/1/ <http://jsfiddle.net/r4WEh/1/>

      The only difference being:
      init();

      vs
      window.onclick = init;

      In the first one the svg is added to the dom with the window onload
      event. In the second one the svg is added to the dom on a mouseclick
      event.

      Any help will be appreciated!



      [Non-text portions of this message have been removed]
    • th_w@ymail.com
      ... Could it be that you only work with Webkit browsers? I don t see a problem with Firefox and Opera. Thomas W.
      Message 2 of 2 , Nov 6, 2012
      • 0 Attachment
        --- In svg-developers@yahoogroups.com, "wenxin1308" <wenxin1308@...> wrote:
        >
        > The animateTransform tag won't work (cannot start the animation) if the
        > SVG isn't appended to the document with the window onload event.
        >
        > Example: http://jsfiddle.net/r4WEh/ <http://jsfiddle.net/r4WEh/> vs
        > http://jsfiddle.net/r4WEh/1/ <http://jsfiddle.net/r4WEh/1/>
        >
        > The only difference being:
        > init();
        >
        > vs
        > window.onclick = init;
        >
        > In the first one the svg is added to the dom with the window onload
        > event. In the second one the svg is added to the dom on a mouseclick
        > event.
        >
        > Any help will be appreciated!
        >

        Could it be that you only work with Webkit browsers? I don't see a problem with Firefox and Opera.

        Thomas W.
      Your message has been successfully submitted and would be delivered to recipients shortly.