mirror of
https://github.com/konvajs/konva.git
synced 2025-10-15 12:34:52 +08:00
limit corner radius
This commit is contained in:
@@ -41,6 +41,7 @@
|
||||
}
|
||||
else {
|
||||
// arcTo would be nicer, but browser support is patchy (Opera)
|
||||
cornerRadius = Math.min(cornerRadius, width / 2, height / 2);
|
||||
context.moveTo(cornerRadius, 0);
|
||||
context.lineTo(width - cornerRadius, 0);
|
||||
context.arc(width - cornerRadius, cornerRadius, cornerRadius, Math.PI * 3 / 2, 0, false);
|
||||
|
Reference in New Issue
Block a user