mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-22 07:19:57 -05:00
Simplify addJoin().
This commit is contained in:
parent
8f7deef61c
commit
a4b37a6278
1 changed files with 22 additions and 27 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue