diff options
author | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2018-05-01 23:51:35 +0200 |
---|---|---|
committer | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2018-05-01 23:51:35 +0200 |
commit | 8b80921347cc1c183d00f442877453aad22ff672 (patch) | |
tree | 6a6bae3bcab05420538623eb00a1d420e7aa4a33 /src/number.js | |
parent | b5d2b9d1429f01ba992ff6900d9d7a7388ae6dbd (diff) | |
download | svg.js-8b80921347cc1c183d00f442877453aad22ff672.tar.gz svg.js-8b80921347cc1c183d00f442877453aad22ff672.zip |
make morphing work, fix inheritance, animations now work
Diffstat (limited to 'src/number.js')
-rw-r--r-- | src/number.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/number.js b/src/number.js index 5d787ad..f1ad9e0 100644 --- a/src/number.js +++ b/src/number.js @@ -45,6 +45,12 @@ SVG.Number = SVG.invent({ toJSON: function () { return this.toString() }, // Convert to primitive + toArray: function () { + return [this.value] + }, + fromArray: function (val) { + return new SVG.Number(val[0]) + }, valueOf: function () { return this.value }, |