From 90f9eeba836adebd25f7152e34a9e6079ec244c3 Mon Sep 17 00:00:00 2001 From: "hyojin.kwak" Date: Wed, 10 Jun 2015 16:10:18 +0900 Subject: [PATCH] Fix #599 --- src/nodeparser.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/nodeparser.js b/src/nodeparser.js index 86d11d8..aa5c25c 100644 --- a/src/nodeparser.js +++ b/src/nodeparser.js @@ -617,14 +617,14 @@ function calculateCurvePoints(bounds, borderRadius, borders) { width = bounds.width, height = bounds.height, - tlh = borderRadius[0][0], - tlv = borderRadius[0][1], - trh = borderRadius[1][0], - trv = borderRadius[1][1], - brh = borderRadius[2][0], - brv = borderRadius[2][1], - blh = borderRadius[3][0], - blv = borderRadius[3][1]; + tlh = borderRadius[0][0] < width / 2 ? borderRadius[0][0] : width / 2, + tlv = borderRadius[0][1] < height / 2 ? borderRadius[0][1] : height / 2, + trh = borderRadius[1][0] < width / 2 ? borderRadius[1][0] : width / 2, + trv = borderRadius[1][1] < height / 2 ? borderRadius[1][1] : height / 2, + brh = borderRadius[2][0] < width / 2 ? borderRadius[2][0] : width / 2, + brv = borderRadius[2][1] < height / 2 ? borderRadius[2][1] : height / 2, + blh = borderRadius[3][0] < width / 2 ? borderRadius[3][0] : width / 2, + blv = borderRadius[3][1] < height / 2 ? borderRadius[3][1] : height / 2; var topWidth = width - trh, rightHeight = height - brv,