From 51643bcada26d57b1d17f84451dfbbcd2ff081a3 Mon Sep 17 00:00:00 2001 From: Eric Rowell Date: Thu, 6 Jun 2013 21:56:40 -0700 Subject: [PATCH] fixed Chrome 27 bug which was drawing circles as rectangles --- src/shapes/Circle.js | 5 +++-- tests/js/unit/tweenTests.js | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/shapes/Circle.js b/src/shapes/Circle.js index a2a96af2..123ddd26 100644 --- a/src/shapes/Circle.js +++ b/src/shapes/Circle.js @@ -1,5 +1,6 @@ (function() { - var PIx2 = Math.PI * 2, + // the 0.0001 offset fixes a bug in Chrome 27 + var PIx2 = (Math.PI * 2) - 0.0001, CIRCLE = 'Circle'; /** @@ -46,7 +47,7 @@ var context = canvas.getContext(); context.beginPath(); - context.arc(0, 0, this.getRadius(), 0, PIx2, true); + context.arc(0, 0, this.getRadius(), 0, PIx2, false); context.closePath(); canvas.fillStroke(this); }, diff --git a/tests/js/unit/tweenTests.js b/tests/js/unit/tweenTests.js index 193b7bc5..2c7b9763 100644 --- a/tests/js/unit/tweenTests.js +++ b/tests/js/unit/tweenTests.js @@ -13,7 +13,7 @@ Test.Modules.TWEEN = { y: stage.getHeight() / 2, radius: 70, fill: 'green', - stroke: 'black', + stroke: 'blue', strokeWidth: 4 });