mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
Add failing test for Path#split, where splitting a straight path should produce linear segments.
This commit is contained in:
parent
6f490d8b34
commit
2fa9e7cf5c
1 changed files with 9 additions and 1 deletions
|
@ -95,4 +95,12 @@ test('Curve list after removing a segment - 2', function() {
|
|||
equals(function() {
|
||||
return path.curves.length;
|
||||
}, 1, 'After removing the last segment, we should be left with one curve');
|
||||
});
|
||||
});
|
||||
|
||||
test('Splitting a straight path should produce linear segments', function() {
|
||||
var path = new Path.Line([0, 0], [50, 50]);
|
||||
var path2 = path.split(0, 0.5);
|
||||
equals(function() {
|
||||
return path2.firstSegment.linear
|
||||
}, true);
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue