mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
Fix issues with JSON symbol test code.
Export was working, but testing code was faulty.
This commit is contained in:
parent
1392f87d85
commit
56bec41877
1 changed files with 5 additions and 3 deletions
|
@ -322,7 +322,7 @@ function compareItems(item, item2, cloned, checkIdentity, dontShareProject) {
|
|||
// PlacedSymbol specific
|
||||
if (item instanceof PlacedSymbol) {
|
||||
if (dontShareProject) {
|
||||
compareItems(item.symbol.definition, item.symbol2.definition,
|
||||
compareItems(item.symbol.definition, item2.symbol.definition,
|
||||
cloned, checkIdentity, dontShareProject,
|
||||
'Compare Symbol#definition');
|
||||
} else {
|
||||
|
@ -380,7 +380,8 @@ function compareItems(item, item2, cloned, checkIdentity, dontShareProject) {
|
|||
return item.children.length == item2.children.length;
|
||||
}, true);
|
||||
for (var i = 0, l = item.children.length; i < l; i++) {
|
||||
compareItems(item.children[i], item2.children[i], cloned, checkIdentity);
|
||||
compareItems(item.children[i], item2.children[i], cloned,
|
||||
checkIdentity, dontShareProject);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -393,7 +394,8 @@ function compareProjects(project, project2) {
|
|||
for (var i = 0, l = project.symbols.length; i < l; i++) {
|
||||
var definition1 = project.symbols[i].definition;
|
||||
var definition2 = project2.symbols[i].definition;
|
||||
compareItems(definition1, definition2, false, false, true, 'Compare Symbol#definition');
|
||||
compareItems(definition1, definition2, false, false, true,
|
||||
'Compare Symbol#definition');
|
||||
}
|
||||
|
||||
// Compare Project#layers:
|
||||
|
|
Loading…
Reference in a new issue