Merge pull request #1312 from rodovich/round-rect-radii

Constrain rounded rect radii to half the width & height.
This commit is contained in:
Juriy Zaytsev 2014-05-08 02:09:38 +02:00
commit 5dd7032aad

View file

@ -108,8 +108,8 @@
return;
}
var rx = this.rx || 0,
ry = this.ry || 0,
var rx = this.rx ? Math.min(this.rx, this.width / 2) : 0,
ry = this.ry ? Math.min(this.ry, this.height / 2) : 0,
w = this.width,
h = this.height,
x = -w / 2,