mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2024-12-29 01:12:39 -05:00
Merge pull request #1305 from sapics/fix-path-constructors
Fix Path.Constructor calls with { insert: false }
This commit is contained in:
commit
4003a8e913
2 changed files with 6 additions and 1 deletions
|
@ -28,7 +28,7 @@ Path.inject({ statics: new function() {
|
|||
path._closed = closed;
|
||||
// Set named arguments at the end, since some depend on geometry to be
|
||||
// defined (e.g. #clockwise)
|
||||
return path.set(props);
|
||||
return path.set(props, {insert: true});
|
||||
}
|
||||
|
||||
function createEllipse(center, radius, args) {
|
||||
|
|
|
@ -130,3 +130,8 @@ test('new Path.Line({ from: from, to: to })', function() {
|
|||
});
|
||||
equals(path.segments.toString(), '{ point: { x: 20, y: 20 } },{ point: { x: 40, y: 40 } }');
|
||||
});
|
||||
|
||||
test('new Path.Line({insert: false, from:[50, 50], to:[100, 100]})', function() {
|
||||
var path = new Path.Line({insert: false, from:[50, 50], to:[100, 100]});
|
||||
equals(path.insert === false, false);
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue