SvgImporter: Further optimise style parsing.

This commit is contained in:
Jürg Lehni 2012-11-06 10:43:32 -08:00
parent dd3a242ee1
commit e26b56f88e

View file

@ -299,10 +299,7 @@ var SvgImporter = this.SvgImporter = new function() {
: entry.type === 'number' : entry.type === 'number'
? parseFloat(value, 10) ? parseFloat(value, 10)
: entry.type === 'array' : entry.type === 'array'
? value.replace(/px/g, '').replace(/, /g, ',') ? value.split(/[\s,]+/g).map(parseFloat)
.replace(/ /g, ',').split(',').map(function(val) {
return parseFloat(val, 10);
})
: value); : value);
} else { } else {
switch (name) { switch (name) {