Constrain rounded rect radii to half the width & height.

This commit is contained in:
Jim Rodovich 2014-05-07 10:25:34 -05:00
parent 4d3f0a73b4
commit 7b4455f29a

View file

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