mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
Add tests for selection state after removing all segments of a path.
This commit is contained in:
parent
1ae2a4ba4b
commit
5e495a3a6e
1 changed files with 19 additions and 0 deletions
|
@ -129,6 +129,25 @@ test('After setting Path#fullySelected=true on an empty path, subsequent segment
|
|||
}, true);
|
||||
});
|
||||
|
||||
test('After removing all segments of a fully selected path, it should still be fully selected.', function() {
|
||||
var path = new Path([10, 20], [30, 40]);
|
||||
path.fullySelected = true;
|
||||
path.removeSegments();
|
||||
equals(function() {
|
||||
return path.fullySelected;
|
||||
}, true);
|
||||
});
|
||||
|
||||
test('After removing all segments of a selected path, it should still be selected.', function() {
|
||||
var path = new Path([10, 20], [30, 40]);
|
||||
path.selected = true;
|
||||
path.removeSegments();
|
||||
equals(function() {
|
||||
return path.selected;
|
||||
}, true);
|
||||
});
|
||||
|
||||
|
||||
test('After simplifying a path using #pointToCurves(), the path should stay fullySelected', function() {
|
||||
var path = new Path();
|
||||
for (var i = 0; i < 30; i++) {
|
||||
|
|
Loading…
Reference in a new issue