mirror of
https://github.com/konvajs/konva.git
synced 2025-10-15 04:14:52 +08:00
fixed Chrome 27 bug which was drawing circles as rectangles
This commit is contained in:
@@ -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);
|
||||
},
|
||||
|
@@ -13,7 +13,7 @@ Test.Modules.TWEEN = {
|
||||
y: stage.getHeight() / 2,
|
||||
radius: 70,
|
||||
fill: 'green',
|
||||
stroke: 'black',
|
||||
stroke: 'blue',
|
||||
strokeWidth: 4
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user