Skip to content

Commit 991a7fa

Browse files
author
Ben Gribaudo
committed
ellipse() now allows postponed style setting
1 parent 4a8168e commit 991a7fa

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

jspdf.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1193,8 +1193,7 @@ var jsPDF = (function(global) {
11931193
* @name ellipse
11941194
*/
11951195
API.ellipse = function(x, y, rx, ry, style) {
1196-
var op = getStyle(style),
1197-
lx = 4 / 3 * (Math.SQRT2 - 1) * rx,
1196+
var lx = 4 / 3 * (Math.SQRT2 - 1) * rx,
11981197
ly = 4 / 3 * (Math.SQRT2 - 1) * ry;
11991198

12001199
out([
@@ -1234,9 +1233,13 @@ var jsPDF = (function(global) {
12341233
f2((pageHeight - (y + ly)) * k),
12351234
f2((x + rx) * k),
12361235
f2((pageHeight - y) * k),
1237-
'c',
1238-
op
1236+
'c'
12391237
].join(' '));
1238+
1239+
if (style !== null) {
1240+
out(getStyle(style));
1241+
}
1242+
12401243
return this;
12411244
};
12421245

0 commit comments

Comments
 (0)