aboutsummaryrefslogtreecommitdiff
path: root/js/lib/geom/circle.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/lib/geom/circle.js')
-rwxr-xr-xjs/lib/geom/circle.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/js/lib/geom/circle.js b/js/lib/geom/circle.js
index 70f608be..8f9f54d1 100755
--- a/js/lib/geom/circle.js
+++ b/js/lib/geom/circle.js
@@ -457,7 +457,7 @@ var Circle = function GLCircle() {
457 if(this._fillColor.gradientMode) { 457 if(this._fillColor.gradientMode) {
458 if(this._fillColor.gradientMode === "radial") { 458 if(this._fillColor.gradientMode === "radial") {
459 gradient = ctx.createRadialGradient(xCtr, yCtr, 0, 459 gradient = ctx.createRadialGradient(xCtr, yCtr, 0,
460 xCtr, yCtr, yScale); 460 xCtr, yCtr, Math.max(yScale, xScale));
461 } else { 461 } else {
462 gradient = ctx.createLinearGradient(0, this._height/2, this._width, this._height/2); 462 gradient = ctx.createLinearGradient(0, this._height/2, this._width, this._height/2);
463 } 463 }
@@ -533,8 +533,8 @@ var Circle = function GLCircle() {
533 if (this._strokeColor) { 533 if (this._strokeColor) {
534 if(this._strokeColor.gradientMode) { 534 if(this._strokeColor.gradientMode) {
535 if(this._strokeColor.gradientMode === "radial") { 535 if(this._strokeColor.gradientMode === "radial") {
536 gradient = ctx.createRadialGradient(xCtr, yCtr, yScale, 536 gradient = ctx.createRadialGradient(xCtr, yCtr, Math.min(xScale, yScale),
537 xCtr, yCtr, 0.5*this._height); 537 xCtr, yCtr, 0.5*Math.max(this._height, this._width));
538 } else { 538 } else {
539 gradient = ctx.createLinearGradient(0, this._height/2, this._width, this._height/2); 539 gradient = ctx.createLinearGradient(0, this._height/2, this._width, this._height/2);
540 } 540 }