Answer the question
In order to leave comments, you need to log in
How can I add my own animation to each path element?
Good day. There was such problem:
I write small application on Angular. I receive data from the server, and based on them I build an image. In general, it consists of the same lines, which are animated when they appear.
<svg style="position: absolute; top: 0; left: 0;" ng-repeat="historyLine in historyLines" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
x="0px" y="0px" viewBox="0 0 1200 1200" enable-background="new 0 0 1200 1200" xml:space="preserve" preserveAspectRatio="xMidYMid meet">
<path transform='rotate({{historyLine.peleng}}, 600, 600)' data-animate='0' id='history_line{{historyLine.id}}' fill='none' stroke='#030406' stroke-dasharray='300 300'
stroke-opacity="0.3" stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' stroke-miterlimit='10'
d='M 600 235 L 600 0'>
</path>
<animate attributeName="stroke-dashoffset" from="300" to="0" begin="0" dur="2s" fill="freeze"/>
</svg>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question