mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-06 04:42:15 -05:00
Add Raster specific tests to compareItems helper function.
This commit is contained in:
parent
b579b9c96c
commit
c3092db208
1 changed files with 17 additions and 3 deletions
|
@ -169,7 +169,21 @@ function compareItems(item, item2) {
|
||||||
}, true);
|
}, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Raster specific
|
// Raster specific
|
||||||
|
if (item instanceof Raster) {
|
||||||
|
if (item._canvas) {
|
||||||
|
equals(function() {
|
||||||
|
return item._canvas != item2._canvas;
|
||||||
|
}, true);
|
||||||
|
}
|
||||||
|
if (item._image) {
|
||||||
|
equals(function() {
|
||||||
|
return item._image = item2._image;
|
||||||
|
}, true);
|
||||||
|
}
|
||||||
|
equals(item._size.toString(), item2._size.toString(),
|
||||||
|
'item._size.toString() == item2._size.toString()');
|
||||||
|
}
|
||||||
|
|
||||||
// TextItem specific:
|
// TextItem specific:
|
||||||
if (item instanceof TextItem) {
|
if (item instanceof TextItem) {
|
||||||
|
|
Loading…
Reference in a new issue