Permalink
Browse files

optimizing dasharray and make tests pass

  • Loading branch information...
nvh committed Feb 1, 2018
1 parent e210fb1 commit 0590c8c83b5f3066472ab0c3e8f306b3dbb76d1e
Showing with 7 additions and 1 deletion.
  1. +7 −1 framer/SVGPath.coffee
@@ -43,7 +43,13 @@ class exports.SVGPath extends SVGBaseLayer
endLength = @strokeEnd ? @length
dasharray = []
if endLength is startLength
dasharray = [0, startLength, 0, @length - endLength]
if startLength isnt 0
dasharray.push(0)
dasharray.push(startLength)
remaining = @length - endLength
if remaining isnt 0
dasharray.push(0)
dasharray.push(remaining)
else if endLength < startLength
gap = startLength - endLength
remaining = @length - startLength

0 comments on commit 0590c8c

Please sign in to comment.