combined Line, Spline, Blob, and Polygon into a single shape for more flexibility. converted allPoints property into cacheable getTensionPoints method

This commit is contained in:
Eric Rowell
2013-11-30 00:24:47 -08:00
parent 4fafde7451
commit 4b62ecea7c
10 changed files with 154 additions and 364 deletions

View File

@@ -24,16 +24,17 @@ suite('Polygon', function() {
y: 93
}];
var poly = new Kinetic.Polygon({
var poly = new Kinetic.Line({
points: points,
fill: 'green',
stroke: 'blue',
strokeWidth: 5
strokeWidth: 5,
closed: true
});
layer.add(poly);
stage.add(layer);
assert.equal(poly.getClassName(), 'Polygon');
assert.equal(poly.getClassName(), 'Line');
});
});