mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
Add failing test for Path#reverse.
This commit is contained in:
parent
0c5595b2a7
commit
30307a0341
1 changed files with 15 additions and 1 deletions
|
@ -88,4 +88,18 @@ test('Is the path deselected after setting a new list of segments?', function()
|
|||
path.segments = [[0, 10]];
|
||||
equals(path.selected, false);
|
||||
equals(doc.selectedItems.length, 0);
|
||||
});
|
||||
});
|
||||
|
||||
test('Path#reverse', function() {
|
||||
var doc = new Document();
|
||||
var path = new Path.Circle([100, 100], 30);
|
||||
path.reverse();
|
||||
compareSegmentLists(path.segments, [new Segment(new Point(100, 130),
|
||||
new Point(-16.568359375, 0), new Point(16.568359375, 0)),
|
||||
new Segment(new Point(130, 100), new Point(0, 16.568359375),
|
||||
new Point(0, -16.568359375)), new Segment(new Point(100, 70),
|
||||
new Point(16.568359375, 0), new Point(-16.568359375, 0)),
|
||||
new Segment(new Point(70, 100), new Point(0, -16.568359375),
|
||||
new Point(0, 16.568359375))]);
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue