line with empty points

This commit is contained in:
lavrton 2015-01-20 17:05:03 +07:00
parent b30f34d2e5
commit cf76a06884
2 changed files with 5 additions and 2 deletions

View File

@ -44,6 +44,10 @@
closed = this.getClosed(),
tp, len, n;
if (!length) {
return;
}
context.beginPath();
context.moveTo(points[0], points[1]);
@ -179,7 +183,7 @@
* line.tension(3);
*/
Kinetic.Factory.addGetterSetter(Kinetic.Line, 'points');
Kinetic.Factory.addGetterSetter(Kinetic.Line, 'points', []);
/**
* get/set points array
* @name points

View File

@ -5,7 +5,6 @@ suite('Line', function() {
var layer = new Kinetic.Layer();
var line = new Kinetic.Line({
points: [73,160,340,23],
stroke: 'blue',
strokeWidth: 20,
lineCap: 'round',