From be81454041ce8dc3aa94d8fae9ef04dc4d88bd78 Mon Sep 17 00:00:00 2001 From: Mikael Sand Date: Sat, 3 Feb 2018 20:09:06 +0200 Subject: [PATCH] Fix strokeWidth hitArea units calculation --- ios/RNSVGRenderable.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ios/RNSVGRenderable.m b/ios/RNSVGRenderable.m index 63cc9312..f7c0e72b 100644 --- a/ios/RNSVGRenderable.m +++ b/ios/RNSVGRenderable.m @@ -266,7 +266,8 @@ if (self.stroke && self.strokeWidth) { // Add stroke to hitArea - CGPathRef strokePath = CGPathCreateCopyByStrokingPath(hitArea, nil, [self.strokeWidth floatValue], self.strokeLinecap, self.strokeLinejoin, self.strokeMiterlimit); + CGFloat width = [self relativeOnOther:self.strokeWidth]; + CGPathRef strokePath = CGPathCreateCopyByStrokingPath(hitArea, nil, width, self.strokeLinecap, self.strokeLinejoin, self.strokeMiterlimit); CGPathAddPath(hitArea, nil, strokePath); CGPathRelease(strokePath); }