mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-08-28 22:08:54 -04:00
Define failing test about Item cloning hierarchy.
Cloned items should be inserted right above their originals.
This commit is contained in:
parent
588abe7189
commit
14888bca50
1 changed files with 13 additions and 1 deletions
|
@ -165,4 +165,16 @@ test('Group with clipmask', function() {
|
|||
group = new Group([path, path2]);
|
||||
group.clipped = true;
|
||||
cloneAndCompare(group);
|
||||
});
|
||||
});
|
||||
|
||||
test('Item#clone() Hierarchy', function() {
|
||||
var path1 = new Path.Circle([150, 150], 60);
|
||||
var path2 = new Path.Circle([150, 150], 60);
|
||||
var clone = path1.clone();
|
||||
equals(function() {
|
||||
return clone.isAbove(path1);
|
||||
}, true);
|
||||
equals(function() {
|
||||
return clone.isBelow(path2);
|
||||
}, true);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue