Skip to content

Commit cb7dcd4

Browse files
committed
Merge pull request #210 from bgribaudo/patch-3
Removing duplication of logic in line().
2 parents eb9dea5 + 91bdc7d commit cb7dcd4

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

jspdf.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1002,10 +1002,7 @@ var jsPDF = (function(global) {
10021002
};
10031003

10041004
API.line = function(x1, y1, x2, y2) {
1005-
out(
1006-
f2(x1 * k) + ' ' + f2((pageHeight - y1) * k) + ' m ' +
1007-
f2(x2 * k) + ' ' + f2((pageHeight - y2) * k) + ' l S');
1008-
return this;
1005+
return this.lines([[x2 - x1, y2 - y1]], x1, y1);
10091006
};
10101007

10111008
/**

0 commit comments

Comments
 (0)