changed shadowFillStroke() to applyStyles(). Took applyLineJoin() out of shape draw functions and moved it to the Shape._draw() method.

This commit is contained in:
Eric Rowell
2012-05-09 22:31:55 -07:00
parent 2993191fe6
commit 28f7fc246d
12 changed files with 41 additions and 51 deletions

View File

@@ -293,7 +293,7 @@ Test.prototype.tests = {
context.lineTo(420, 80);
context.quadraticCurveTo(300, 100, 260, 170);
context.closePath();
this.shadowFillStroke();
this.applyStyles();
};
var triangle = new Kinetic.Shape({
drawFunc: drawTriangle,
@@ -325,7 +325,7 @@ Test.prototype.tests = {
context.lineTo(420, 80);
context.quadraticCurveTo(300, 100, 260, 170);
context.closePath();
this.shadowFillStroke();
this.applyStyles();
};
var json = '{"attrs":{"width":578,"height":200,"visible":true,"listening":true,"alpha":1,"x":0,"y":0,"scale":{"x":1,"y":1},"rotation":0,"centerOffset":{"x":0,"y":0},"dragConstraint":"none","dragBounds":{},"draggable":false},"nodeType":"Stage","children":[{"attrs":{"throttle":80,"visible":true,"listening":true,"alpha":1,"x":0,"y":0,"scale":{"x":1,"y":1},"rotation":0,"centerOffset":{"x":0,"y":0},"dragConstraint":"none","dragBounds":{},"draggable":false},"nodeType":"Layer","children":[{"attrs":{"visible":true,"listening":true,"alpha":1,"x":0,"y":0,"scale":{"x":1,"y":1},"rotation":0,"centerOffset":{"x":0,"y":0},"dragConstraint":"none","dragBounds":{},"draggable":false},"nodeType":"Group","children":[{"attrs":{"fill":"#00D2FF","stroke":"black","strokeWidth":4,"detectionType":"path","visible":true,"listening":true,"alpha":1,"x":0,"y":0,"scale":{"x":1,"y":1},"rotation":0,"centerOffset":{"x":0,"y":0},"dragConstraint":"none","dragBounds":{},"draggable":false,"id":"myTriangle"},"nodeType":"Shape"}]}]}]}';
stage.load(json);
@@ -1548,7 +1548,7 @@ Test.prototype.tests = {
context.lineTo(100, 0);
context.lineTo(100, 100);
context.closePath();
this.shadowFillStroke();
this.applyStyles();
},
x: 200,
y: 100,
@@ -1575,7 +1575,7 @@ Test.prototype.tests = {
context.lineTo(100, 0);
context.lineTo(100, 100);
context.closePath();
this.shadowFillStroke();
this.applyStyles();
},
x: 200,
y: 100,
@@ -1591,7 +1591,7 @@ Test.prototype.tests = {
context.lineTo(200, 0);
context.lineTo(200, 100);
context.closePath();
this.shadowFillStroke();
this.applyStyles();
});
layer.add(shape);