SVG动画和Firefox [英] SVG animation and firefox
问题描述
我和SVG动画绘制,这是完全在所有浏览器工作的奋斗(即使IE浏览器与没有问题),只有火狐无法正确绘制
I'm struggle with SVG animation drawing, which is work perfectly on all browsers (even IE has no problems with that), only firefox not drawing correctly
脚本它自我工作
http://tympanus.net/Development/SVGDrawingAnimation/
但是,当我生成矢量图像SVG code它不会在Firefox工作
示例 - codePEN
But when I generate SVG code from vector image it does not work on firefox Example - CODEPEN
这是100%的SVG路径问题,一些与code。不过什么?
It is 100% svg path issue, something with code. But what?
推荐答案
如果你看看<路径>
的风格在你的Firefox DOM查看,你会看到它拒绝解析某些中风dasharray的
值。如果没有虚线图案,你不会看到这些路径动画。
If you look at the <path>
styles in your Firefox DOM inspector, you'll see that it is refusing to parse some of the stroke-dasharray
values. Without the dash pattern, you won't see the animation on those paths.
在特别是,Firefox是具有一个问题的路径都报告了数十亿单位总长度。现在,有没有什么,指出路径长度和划线模式的无法的是数十亿长单位规格的,但它并不是不合理的Firefox的实施只能达到一定的最大值。
In particular, the paths that Firefox is having a problem with are all reporting total lengths in the billions of units. Now, there's nothing in the specs that says that path lengths and dash patterns can't be billions of units long, but it is not unreasonable that the Firefox implementation only works up to a certain maximum.
什么是不合理的是,Firefox是计算在第一时间如此极端的路径长度。例如,对于在绘图FF28第一路径报告的路径长度为308225966080,而铬计算它作为920.6周围
What is unreasonable is that Firefox is calculating such extreme path lengths in the first place. For example, for the first path in the drawing FF28 reports the path length as 308225966080, while Chrome calculates it as around 920.6.
原来,与 getTotalLength
的问题是一个的已知的bug在Firefox 28 。希望这将尽快修复!
Turns out that the problem with getTotalLength
is a known bug in Firefox 28. Hopefully it will be fixed soon!
这篇关于SVG动画和Firefox的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!