summaryrefslogtreecommitdiffstats
path: root/src/number.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/number.js')
-rw-r--r--src/number.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/number.js b/src/number.js
index f1ad9e0..1a24954 100644
--- a/src/number.js
+++ b/src/number.js
@@ -3,6 +3,8 @@
SVG.Number = SVG.invent({
// Initialize
create: function (value, unit) {
+ value = Array.isArray(value) ? value[0] : value
+
// initialize defaults
this.value = 0
this.unit = unit || ''
@@ -48,9 +50,6 @@ SVG.Number = SVG.invent({
toArray: function () {
return [this.value]
},
- fromArray: function (val) {
- return new SVG.Number(val[0])
- },
valueOf: function () {
return this.value
},