mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2024-12-29 09:22:22 -05:00
Fix Layer#insertAbove / insertBelow test.
This commit is contained in:
parent
16735e23af
commit
98697eb003
2 changed files with 4 additions and 2 deletions
|
@ -16,6 +16,7 @@ function cloneAndCompare(item) {
|
|||
return item.parent == copy.parent;
|
||||
}, true);
|
||||
equals(function() {
|
||||
// Cloned items appear above the original.
|
||||
return item.nextSibling == copy;
|
||||
}, true);
|
||||
if (item.name) {
|
||||
|
|
|
@ -76,10 +76,11 @@ test('insertAbove / insertBelow', function() {
|
|||
var path = new Path();
|
||||
firstLayer.addChild(path);
|
||||
|
||||
// move the layer above the path, inside the firstLayer:
|
||||
// move the layer above the path, inside the firstLayer.
|
||||
// 'Above' means visually appearing on top, thus with a larger index.
|
||||
secondLayer.insertAbove(path);
|
||||
equals(function() {
|
||||
return secondLayer.nextSibling == path;
|
||||
return path.nextSibling == secondLayer;
|
||||
}, true);
|
||||
equals(function() {
|
||||
return secondLayer.parent == firstLayer;
|
||||
|
|
Loading…
Reference in a new issue