Merge pull request #1305 from sapics/fix-path-constructors

Fix Path.Constructor calls with { insert: false }
This commit is contained in:
Jürg Lehni 2017-04-10 09:21:08 +02:00 committed by GitHub
commit 4003a8e913
2 changed files with 6 additions and 1 deletions

View file

@ -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) {

View file

@ -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);
});