summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorwout <wout@impinc.co.uk>2014-01-22 21:09:38 +0100
committerwout <wout@impinc.co.uk>2014-01-22 21:09:38 +0100
commit551e3d6bb980bca77f2abf606a25bc2fc8a02534 (patch)
treeae935d2c9944a7b90f80e52d07373ecda17df509 /src
parent0bec3f4b0eedfa603ed0b92e151315dfc92b42c2 (diff)
downloadsvg.js-551e3d6bb980bca77f2abf606a25bc2fc8a02534.tar.gz
svg.js-551e3d6bb980bca77f2abf606a25bc2fc8a02534.zip
Fix in point array move method0.34
Diffstat (limited to 'src')
-rwxr-xr-xsrc/array.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/array.js b/src/array.js
index b51d740..75c035f 100755
--- a/src/array.js
+++ b/src/array.js
@@ -133,8 +133,9 @@ SVG.extend(SVG.PointArray, {
y -= box.y
/* move every point */
- for (var i = this.value.length - 1; i >= 0; i--)
- this.value[i] = [this.value[i][0] + x, this.value[i][1] + y]
+ if (!isNaN(x) && !isNaN(y))
+ for (var i = this.value.length - 1; i >= 0; i--)
+ this.value[i] = [this.value[i][0] + x, this.value[i][1] + y]
return this
}