mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-06 04:42:15 -05:00
Tests: compareItems: compare item#matrix if present.
This commit is contained in:
parent
c3092db208
commit
d03dd05195
1 changed files with 8 additions and 0 deletions
|
@ -136,6 +136,14 @@ function compareItems(item, item2) {
|
||||||
'item._matrix.toString() == item2._matrix.toString()');
|
'item._matrix.toString() == item2._matrix.toString()');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (item.matrix) {
|
||||||
|
equals(function() {
|
||||||
|
return item.matrix != item2.matrix;
|
||||||
|
}, true);
|
||||||
|
equals(item.matrix.toString(), item2.matrix.toString(),
|
||||||
|
'item.matrix.toString() == item2.matrix.toString()');
|
||||||
|
}
|
||||||
|
|
||||||
if (item2.segments) {
|
if (item2.segments) {
|
||||||
equals(item.segments.toString(), item2.segments.toString(),
|
equals(item.segments.toString(), item2.segments.toString(),
|
||||||
'item.segments.toString() == item2.segments.toString()');
|
'item.segments.toString() == item2.segments.toString()');
|
||||||
|
|
Loading…
Reference in a new issue