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'
? parseFloat(value, 10)
: entry.type === 'array'
? value.replace(/px/g, '').replace(/, /g, ',')
.replace(/ /g, ',').split(',').map(function(val) {
return parseFloat(val, 10);
})
? value.split(/[\s,]+/g).map(parseFloat)
: value);
} else {
switch (name) {