mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-19 14:10:14 -05:00
SvgImporter: Fix issue with importText().
This commit is contained in:
parent
9f6e43454a
commit
6475d61c89
1 changed files with 4 additions and 2 deletions
|
@ -46,13 +46,15 @@ new function() {
|
|||
function getPoint(svg, x, y, allowNull, index) {
|
||||
x = getValue(svg, x, allowNull, index);
|
||||
y = getValue(svg, y, allowNull, index);
|
||||
return x == null && y == null ? null : Point.create(x || 0, y || 0);
|
||||
return allowNull && x == null && y == null ? null
|
||||
: Point.create(x || 0, y || 0);
|
||||
}
|
||||
|
||||
function getSize(svg, w, h, allowNull, index) {
|
||||
w = getValue(svg, w, allowNull, index);
|
||||
h = getValue(svg, h, allowNull, index);
|
||||
return w == null && h == null ? null : Size.create(w || 0, h || 0);
|
||||
return allowNull && w == null && h == null ? null
|
||||
: Size.create(w || 0, h || 0);
|
||||
}
|
||||
|
||||
// Converts a string attribute value to the specified type
|
||||
|
|
Loading…
Reference in a new issue