mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-07 13:22:07 -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'
|
: 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) {
|
||||||
|
|
Loading…
Reference in a new issue