mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-06-05 16:04:38 +00:00
fix touch events within the elements which are nested in G
This commit is contained in:
@@ -71,10 +71,7 @@
|
||||
{
|
||||
CGRect rect = [self getRect:context];
|
||||
// add hit area
|
||||
self.hitArea = CGPathCreateMutable();
|
||||
CGPathRef path = CGPathCreateWithRect(rect, nil);
|
||||
CGPathAddPath(self.hitArea, nil, path);
|
||||
CGPathRelease(path);
|
||||
self.hitArea = CGPathCreateWithRect(rect, nil);
|
||||
[self clip:context];
|
||||
|
||||
CGContextSaveGState(context);
|
||||
@@ -97,9 +94,7 @@
|
||||
|
||||
- (CGPathRef)getPath:(CGContextRef)context
|
||||
{
|
||||
CGMutablePathRef path = CGPathCreateMutable();
|
||||
CGPathAddRect(path, nil, [self getRect:context]);
|
||||
return (CGPathRef)CFAutorelease(path);
|
||||
return CGPathCreateWithRect([self getRect:context], nil);
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user