summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErik Demaine <edemaine@mit.edu>2018-12-14 09:12:53 -0500
committerErik Demaine <edemaine@mit.edu>2018-12-14 09:12:53 -0500
commit7a67de3aa992e8cf9b9110832f6ec2a55b378df7 (patch)
treec7ffa4eb3454add7f9415502a0032ac9b8f74185
parent78e40cb0aa4a0e3a8ee024651fba0cbfc2494bee (diff)
downloadsvg.js-7a67de3aa992e8cf9b9110832f6ec2a55b378df7.tar.gz
svg.js-7a67de3aa992e8cf9b9110832f6ec2a55b378df7.zip
Bug fix
-rw-r--r--src/types/PointArray.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/types/PointArray.js b/src/types/PointArray.js
index 4117233..53ac425 100644
--- a/src/types/PointArray.js
+++ b/src/types/PointArray.js
@@ -73,12 +73,14 @@ extend(PointArray, {
// transform points with matrix (similar to Point.transform)
transform (m) {
- let points = []
+ const points = []
for (let point of this) {
// Perform the matrix multiplication
- points.push([m.a * point.x + m.c * point.y + m.e,
- m.b * point.x + m.d * point.y + m.f])
+ points.push([
+ m.a * point[0] + m.c * point[1] + m.e,
+ m.b * point[0] + m.d * point[1] + m.f
+ ])
}
// Return the required point