Simplify addJoin().

This commit is contained in:
Jürg Lehni 2011-05-06 00:39:44 +01:00
parent 8f7deef61c
commit a4b37a6278

View file

@ -1098,14 +1098,11 @@ var Path = this.Path = PathItem.extend({
if (join === 'round' || handleIn && handleOut) {
bounds = bounds.unite(joinBounds.setCenter(matrix
? matrix.transform(segment._point) : segment._point));
} else {
switch (join) {
case 'bevel':
} else if (join == 'bevel') {
var curve = segment.getCurve();
addBevelJoin(curve, 0);
addBevelJoin(curve.getPrevious(), 1);
break;
case 'miter':
} else if (join == 'miter') {
var curve2 = segment.getCurve(),
curve1 = curve2.getPrevious(),
point = curve2.getPoint(0),
@ -1124,8 +1121,6 @@ var Path = this.Path = PathItem.extend({
} else {
add(corner);
}
break;
}
}
}