Comparing version 2.1.5 to 2.1.6
@@ -0,1 +1,7 @@ | ||
2.1.6 / 2016-03-09 | ||
------------------ | ||
- Fixed arc transforms for edge cases (precision + sweep flag), #23. | ||
2.1.5 / 2016-01-03 | ||
@@ -2,0 +8,0 @@ ------------------ |
@@ -70,3 +70,3 @@ 'use strict'; | ||
// the x - axis - rotation angle is the argument of the l1 - eigenvector | ||
this.ax = (L === 0 && l1 === K) ? | ||
this.ax = (Math.abs(L) < epsilon && Math.abs(l1 - K) < epsilon) ? | ||
90 | ||
@@ -73,0 +73,0 @@ : |
@@ -86,4 +86,10 @@ // SVG Path transformations library | ||
// Transform rx, ry and the x-axis-rotation | ||
var e = ellipse(s[1], s[2], s[3]).transform(m.toArray()); | ||
var ma = m.toArray(); | ||
var e = ellipse(s[1], s[2], s[3]).transform(ma); | ||
// flip sweep-flag if matrix is not orientation-preserving | ||
if (ma[0] * ma[3] - ma[1] * ma[2] < 0) { | ||
s[5] = s[5] ? '0' : '1'; | ||
} | ||
// Transform end point as usual (without translation for relative notation) | ||
@@ -90,0 +96,0 @@ p = m.calc(s[6], s[7], s[0] === 'a'); |
{ | ||
"name": "svgpath", | ||
"version": "2.1.5", | ||
"version": "2.1.6", | ||
"description": "Low level toolkit for SVG paths transformations.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
40461
1115