bartbutenaers / node-red-contrib-ui-svg

A Node-RED widget node to show interactive SVG (vector graphics) in the dashboard
Apache License 2.0
93 stars 27 forks source link

Animation fill="freeze" not working if configured via Animations tab #60

Closed ipamaas closed 4 years ago

ipamaas commented 4 years ago

The animation fill="freeze" is not working if set in Animations tab. The animation will jump back to the from-Values (resets the animation). Tested with current versions of Opera and Firefox. Not working:: grafik Working if directly embedded in SVG file:

    <animate 
       xlink:href="#svg_press_element"
       attributeName="points"
       from="107.829,108.999 107.265,178.435 90.3291,178.999 90.3291,197.628 160.894,197.063 160.33,178.998 142.265,178.434 141.136,108.998"
       to="107.829,139.483 107.265,208.919 90.3291,209.483 90.3291,228.112 160.894,227.547 160.33,209.482 142.265,208.918 141.136,139.482" 
       dur="6s"
       fill="freeze"
       id="press_down_anim"/>
bartbutenaers commented 4 years ago

Hi Matthias, could you please create export a (simplified) flow so I can reproduce this quickly. Because I'm rather short on free time at the moment... Thanks!!! Bart

ipamaas commented 4 years ago

Hi Bart, please find attached a simplified woking and a failing sample flow.

flow_samples.zip

There's no rush to solve this now as the workaround of embedding the animation in the svg itself is still working.

BR Matthias

bartbutenaers commented 4 years ago

Hey Matthias, Sorry for the delay. I have fixed this in the "panzoom" branch on Github, which will become soon the 2.0.0 release of this node. Now it seems to be working fine:

svg_end_freeze_fix

Kind regards, Bart