Skip to content

Commit 98697eb

Browse files
committed
Fix Layer#insertAbove / insertBelow test.
1 parent 16735e2 commit 98697eb

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

test/tests/Item_Cloning.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ function cloneAndCompare(item) {
1616
return item.parent == copy.parent;
1717
}, true);
1818
equals(function() {
19+
// Cloned items appear above the original.
1920
return item.nextSibling == copy;
2021
}, true);
2122
if (item.name) {

test/tests/Layer.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,11 @@ test('insertAbove / insertBelow', function() {
7676
var path = new Path();
7777
firstLayer.addChild(path);
7878

79-
// move the layer above the path, inside the firstLayer:
79+
// move the layer above the path, inside the firstLayer.
80+
// 'Above' means visually appearing on top, thus with a larger index.
8081
secondLayer.insertAbove(path);
8182
equals(function() {
82-
return secondLayer.nextSibling == path;
83+
return path.nextSibling == secondLayer;
8384
}, true);
8485
equals(function() {
8586
return secondLayer.parent == firstLayer;

0 commit comments

Comments
 (0)