mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -05:00
SvgImporter: Further optimise style parsing.
This commit is contained in:
parent
dd3a242ee1
commit
e26b56f88e
1 changed files with 1 additions and 4 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue