Spline no longer extends Line. Blob no longer extends Spline. point getter setters were extracted out to Node. control point expansion method in Spline was pulled out and put in Util

This commit is contained in:
Eric Rowell
2013-06-08 14:17:26 -07:00
parent e8ea9340fe
commit 79c3124ed7
8 changed files with 189 additions and 123 deletions

View File

@@ -58,6 +58,8 @@ Test.Modules.BLOB = {
test(blob2.getTension() === 1.2, 'blob2 tension should be 1.2');
test(blob1.getClassName() === 'Blob', 'getClassName should be Blob');
//console.log(blob1.getPoints())
}

View File

@@ -1,5 +1,5 @@
Test.Modules.LINE = {
'*add line': function(containerId) {
'add line': function(containerId) {
var stage = new Kinetic.Stage({
container: containerId,
width: 578,
@@ -84,7 +84,7 @@ Test.Modules.LINE = {
test(redLine.getPoints()[0].x === 4, 'redLine points is wrong');
},
'*add dashed line': function(containerId) {
'add dashed line': function(containerId) {
var stage = new Kinetic.Stage({
container: containerId,
width: 578,

View File

@@ -1,5 +1,5 @@
Test.Modules.POLYGON = {
'*add polygon': function(containerId) {
'add polygon': function(containerId) {
var stage = new Kinetic.Stage({
container: containerId,
width: 578,

View File

@@ -69,15 +69,9 @@ Test.Modules.SPLINE = {
layer.add(line3);
stage.add(layer);
/*
line.transitionTo({
spline: 3,
duration: 3
});
*/
test(line1.getClassName() === 'Spline', 'getClassName should be Spline');
},
'create from points represented as a flat array': function(containerId) {
var stage = new Kinetic.Stage({