summaryrefslogtreecommitdiffstats
path: root/src/patharray.js
diff options
context:
space:
mode:
authorUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2018-05-01 23:51:35 +0200
committerUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2018-05-01 23:51:35 +0200
commit8b80921347cc1c183d00f442877453aad22ff672 (patch)
tree6a6bae3bcab05420538623eb00a1d420e7aa4a33 /src/patharray.js
parentb5d2b9d1429f01ba992ff6900d9d7a7388ae6dbd (diff)
downloadsvg.js-8b80921347cc1c183d00f442877453aad22ff672.tar.gz
svg.js-8b80921347cc1c183d00f442877453aad22ff672.zip
make morphing work, fix inheritance, animations now work
Diffstat (limited to 'src/patharray.js')
-rw-r--r--src/patharray.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/patharray.js b/src/patharray.js
index d9ffecd..cbb4ced 100644
--- a/src/patharray.js
+++ b/src/patharray.js
@@ -87,6 +87,14 @@ SVG.extend(SVG.PathArray, {
toString: function () {
return arrayToString(this.value)
},
+ toArray: function () {
+ return this.value.reduce(function (prev, curr) {
+ return [].concat.call(prev, curr)
+ }, [])
+ },
+ fromArray: function (a) {
+ return new SVG.PathArray(a)
+ },
// Move path string
move: function (x, y) {
// get bounding box of current situation