mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-19 14:10:14 -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);
|
}, 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() {
|
test('After simplifying a path using #pointToCurves(), the path should stay fullySelected', function() {
|
||||||
var path = new Path();
|
var path = new Path();
|
||||||
for (var i = 0; i < 30; i++) {
|
for (var i = 0; i < 30; i++) {
|
||||||
|
|
Loading…
Reference in a new issue