From b9b4af505a8f6abae7167bdff39d88c484d51aa7 Mon Sep 17 00:00:00 2001 From: wout Date: Mon, 1 Jul 2013 08:26:18 +0100 Subject: Fix in SVG.Number for IE --- dist/svg.js | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'dist/svg.js') diff --git a/dist/svg.js b/dist/svg.js index 4707933..9fa35c8 100644 --- a/dist/svg.js +++ b/dist/svg.js @@ -1,4 +1,4 @@ -/* svg.js v0.23-1-ge4fb852 - svg regex default color number viewbox bbox rbox element container fx event defs group arrange mask clip pattern gradient use doc shape rect ellipse line poly path plotable image text nested sugar - svgjs.com/license */ +/* svg.js v0.23-2-g578c2bd - svg regex default color number viewbox bbox rbox element container fx event defs group arrange mask clip pattern gradient use doc shape rect ellipse line poly path plotable image text nested sugar - svgjs.com/license */ ;(function() { this.SVG = function(element) { @@ -261,16 +261,18 @@ case 'string': var match = value.match(SVG.regex.unit) - /* make value numeric */ - this.value = parseFloat(match[1]) - - /* normalize percent value */ - if (match[2] == '%') - this.value /= 100 - - /* store unit */ - this.unit = match[2] - + if (match) { + /* make value numeric */ + this.value = parseFloat(match[1]) + + /* normalize percent value */ + if (match[2] == '%') + this.value /= 100 + + /* store unit */ + this.unit = match[2] + } + break default: if (value instanceof SVG.Number) { -- cgit v1.2.3