diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/number.js | 2 | ||||
-rw-r--r-- | src/regex.js | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/number.js b/src/number.js index 28e260e..8cbf93a 100644 --- a/src/number.js +++ b/src/number.js @@ -13,7 +13,7 @@ SVG.Number = function(value) { case 'string': var match = value.match(SVG.regex.unit) - /* make valu numeric */ + /* make value numeric */ this.value = parseFloat(match[1]) /* normalize percent value */ diff --git a/src/regex.js b/src/regex.js index 4286d8a..602d2c7 100644 --- a/src/regex.js +++ b/src/regex.js @@ -6,7 +6,7 @@ SVG.regex = { } /* parse unit value */ -, unit: /^([\d\.]+)([a-z%]{0,2})$/ +, unit: /^(-?[\d\.]+)([a-z%]{0,2})$/ /* parse hex value */ , hex: /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i |