mirror of
https://github.com/konvajs/konva.git
synced 2025-04-05 20:48:28 +08:00
line with empty points
This commit is contained in:
parent
b30f34d2e5
commit
cf76a06884
@ -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
|
||||
|
@ -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',
|
||||
|
Loading…
Reference in New Issue
Block a user