mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
Tests: use compareSegmentLists in compareItems helper.
This commit is contained in:
parent
fc8a9bb10b
commit
f5e9ad2e85
1 changed files with 7 additions and 10 deletions
|
@ -273,22 +273,19 @@ function compareItems(item, item2, checkIdentity) {
|
|||
'Compare Item#matrix');
|
||||
}
|
||||
|
||||
if (item2.segments) {
|
||||
if (checkIdentity) {
|
||||
equals(function() {
|
||||
return item.segments != item2.segments;
|
||||
}, true);
|
||||
}
|
||||
equals(item.segments.toString(), item2.segments.toString(),
|
||||
'Compare Item#segments');
|
||||
}
|
||||
|
||||
// Path specific
|
||||
|
||||
// PathItem specific
|
||||
if (item instanceof PathItem) {
|
||||
equals(function() {
|
||||
return item.clockwise == item2.clockwise;
|
||||
}, true);
|
||||
}
|
||||
|
||||
// Path specific
|
||||
if (item2 instanceof Path) {
|
||||
compareSegmentLists(item.segments, item2.segments, checkIdentity);
|
||||
}
|
||||
|
||||
// Group specific
|
||||
if (item instanceof Group) {
|
||||
|
|
Loading…
Reference in a new issue