mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
Add tests for Item#sendToBack & Item#bringToFront.
This commit is contained in:
parent
3cdb11fe36
commit
343dac35b1
1 changed files with 20 additions and 0 deletions
|
@ -143,6 +143,26 @@ test('insertBelow(item)', function() {
|
|||
}, true);
|
||||
});
|
||||
|
||||
test('sendToBack()', function() {
|
||||
var project = paper.project;
|
||||
var firstPath = new Path();
|
||||
var secondPath = new Path();
|
||||
secondPath.sendToBack();
|
||||
equals(function() {
|
||||
return secondPath.index == 0;
|
||||
}, true);
|
||||
});
|
||||
|
||||
test('bringToFront()', function() {
|
||||
var project = paper.project;
|
||||
var firstPath = new Path();
|
||||
var secondPath = new Path();
|
||||
firstPath.bringToFront();
|
||||
equals(function() {
|
||||
return firstPath.index == 1;
|
||||
}, true);
|
||||
});
|
||||
|
||||
test('isDescendant(item) / isAncestor(item)', function() {
|
||||
var project = paper.project;
|
||||
var path = new Path();
|
||||
|
|
Loading…
Reference in a new issue