I
I
ilya4042017-05-30 00:31:30
JavaScript
ilya404, 2017-05-30 00:31:30

Why is the SVG restart attribute being ignored by Safari?

Hello!
Guys, the svg line with animation is rendered on click. So that when generating new lines, the old ones are not re-animated, I set the attribute restart with the value never for each.

lineAnimate.setAttribute('values', '0; 1; 2; 3; 4');
lineAnimate.setAttribute('keyTimes', '0; 0.25; 0.50; 0.75; 1');
lineAnimate.setAttribute('dur', '500ms');
lineAnimate.setAttribute('begin', 'canv.mouseup');
lineAnimate.setAttribute('fill', 'freeze');
lineAnimate.setAttribute('restart', 'never');

The code executes perfectly everywhere except Safari and any browser on iOS: when a new line is rendered, ALL previous ones restart their animation. What to do?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question