mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-07 13:22:07 -05:00
Minor clean-ups.
This commit is contained in:
parent
785381b148
commit
278a9771ba
1 changed files with 3 additions and 3 deletions
|
@ -24,7 +24,7 @@ new function() {
|
||||||
value = namespace
|
value = namespace
|
||||||
? node.getAttributeNS(namespace, name)
|
? node.getAttributeNS(namespace, name)
|
||||||
: node.getAttribute(name);
|
: node.getAttribute(name);
|
||||||
if (value == 'null')
|
if (value === 'null')
|
||||||
value = null;
|
value = null;
|
||||||
// Interpret value as number. Never return NaN, but 0 instead.
|
// Interpret value as number. Never return NaN, but 0 instead.
|
||||||
// If the value is a sequence of numbers, parseFloat will
|
// If the value is a sequence of numbers, parseFloat will
|
||||||
|
@ -95,9 +95,9 @@ new function() {
|
||||||
var childNode = nodes[i],
|
var childNode = nodes[i],
|
||||||
child;
|
child;
|
||||||
if (childNode.nodeType == 1 && (child = importSVG(childNode))) {
|
if (childNode.nodeType == 1 && (child = importSVG(childNode))) {
|
||||||
// If adding CompoundPaths to other CompoundPaths,
|
// When adding CompoundPaths to other CompoundPaths,
|
||||||
// we need to "unbox" them first:
|
// we need to "unbox" them first:
|
||||||
if (clip && child instanceof CompoundPath) {
|
if (child instanceof CompoundPath) {
|
||||||
children.push.apply(children, child.removeChildren());
|
children.push.apply(children, child.removeChildren());
|
||||||
child.remove();
|
child.remove();
|
||||||
} else if (!(child instanceof Symbol)) {
|
} else if (!(child instanceof Symbol)) {
|
||||||
|
|
Loading…
Reference in a new issue