mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 10:48:38 -05:00
Segment tests: add a test for segment selection.
This commit is contained in:
parent
c1ec991aee
commit
2496f08b17
1 changed files with 10 additions and 0 deletions
|
@ -48,4 +48,14 @@ test('segment.remove()', function() {
|
|||
var path = new Path([10, 10], [5, 5], [10, 10]);
|
||||
path.segments[1].remove();
|
||||
equals(path.segments.length, 2);
|
||||
});
|
||||
|
||||
test('segment.selected', function() {
|
||||
var doc = new Document();
|
||||
var path = new Path([10, 20], [50, 100]);
|
||||
path.segments[0].point.selected = true;
|
||||
equals(path.segments[0].point.selected, true);
|
||||
|
||||
path.segments[0].point.selected = false;
|
||||
equals(path.segments[0].point.selected, false);
|
||||
});
|
Loading…
Reference in a new issue