Skip to content

Commit

Permalink
Fixes svg#218
Browse files Browse the repository at this point in the history
  • Loading branch information
alexjlockwood authored and GreLI committed Nov 22, 2017
1 parent 54de6f7 commit b182569
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/_path.js
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,7 @@ function gatherPoints(points, item, index, path) {
prevCtrlPoint = [data[2] - data[0], data[3] - data[1]]; // Save control point for shorthand
break;
case 'T':
if (prev.instruction == 'Q' && prev.instruction == 'T') {
if (prev.instruction == 'Q' || prev.instruction == 'T') {
ctrlPoint = [basePoint[0] + prevCtrlPoint[0], basePoint[1] + prevCtrlPoint[1]];
addPoint(subPath, ctrlPoint);
prevCtrlPoint = [data[0] - ctrlPoint[0], data[1] - ctrlPoint[1]];
Expand All @@ -766,7 +766,7 @@ function gatherPoints(points, item, index, path) {
prevCtrlPoint = [data[4] - data[2], data[5] - data[3]]; // Save control point for shorthand
break;
case 'S':
if (prev.instruction == 'C' && prev.instruction == 'S') {
if (prev.instruction == 'C' || prev.instruction == 'S') {
addPoint(subPath, [basePoint[0] + .5 * prevCtrlPoint[0], basePoint[1] + .5 * prevCtrlPoint[1]]);
ctrlPoint = [basePoint[0] + prevCtrlPoint[0], basePoint[1] + prevCtrlPoint[1]];
}
Expand Down

0 comments on commit b182569

Please sign in to comment.