mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-06-02 14:50:43 +00:00
Fix touch events on Text elements
This commit is contained in:
@@ -29,8 +29,12 @@
|
||||
[self clip:context];
|
||||
CGContextSaveGState(context);
|
||||
[self setupGlyphContext:context];
|
||||
CGAffineTransform transform = [self getAlignTransform:context];
|
||||
CGPathRef path = [self getPath:context];
|
||||
|
||||
CGAffineTransform transform = [self getAlignTransform:context path:path];
|
||||
CGContextConcatCTM(context, transform);
|
||||
|
||||
[self setHitArea:path];
|
||||
[self renderGroupTo:context];
|
||||
[self releaseCachedPath];
|
||||
CGContextRestoreGState(context);
|
||||
@@ -80,11 +84,6 @@
|
||||
[self popGlyphContext];
|
||||
}
|
||||
|
||||
- (CGAffineTransform)getAlignTransform:(CGContextRef)context
|
||||
{
|
||||
return [self getAlignTransform:context path:[self getGroupPath:context]];
|
||||
}
|
||||
|
||||
- (CGAffineTransform)getAlignTransform:(CGContextRef)context path:(CGPathRef)path
|
||||
{
|
||||
CGFloat width = CGRectGetWidth(CGPathGetBoundingBox(path));
|
||||
|
||||
Reference in New Issue
Block a user